首页 > 解决方案 > Powershell scrip forloop gettings errors

问题描述

Trying to automate a task using PowerShell. The command that I am using is New-NpsRadiusClient. I have a CSV file with four columns:

I'm new to PowerShell. I have no experience at all. How do I get this to work? Thanks.

$csv = Import-Csv .\npsDevices.csv
foreach ($line in $csv) {
    New-NpsRadiusClient -Name $ClientName -Address $IPAddress -VendorName $Vendor -SharedSecret $strSharedSecret
}

标签: powershellfor-loop

解决方案


推荐阅读