Hello,
I execute the following and get the error that follows. The $IDs vaiable is a PSCustomObject object, but Get-Aduser wants a type of ADUser object. So how can a pass a CSV file of PSCustomObjects to a Get-ADuser cmdlet?
$IDs = import-csv testids.csv foreach ($Account in $IDs) { $IDAttrs = get-aduser $Account -properties * The CSV file has SamAccount Names as follows: ID __ AU DU Joe
Get-ADUser : Cannot bind parameter 'Identity'. Cannot convert the "@{ID=AU}" value of type "System.Management.Automation.PSCustomObject" to type "Microso ft.ActiveDirectory.Management.ADUser".