function ManageAdUsers($CsvFile)
{
$MyVariable = 99
$SAM = ""
$bAlreadyProcessed = $false
$Items = Import-Csv -path "$CsvFile" –delimiter ";" | foreach ($Item in $Items) {Write-Host $Item}
--> give this error
PS M:\ICT Manager\Scripts\PS1> .\importad.ps1
Unexpected token 'in' in expression or statement.
At M:\ICT Manager\Scripts\PS1\ImportAD.ps1:18 char:72
+ $Items = Import-Csv -path "$CsvFile" -delimiter ";" | foreach ($Item in <<<<
$Items) {Write-Host $Item}
+ CategoryInfo : ParserError: (in:String) [], ParseException
+ FullyQualifiedErrorId : UnexpectedToken
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.