$OUpath = 'OU=Cloud RBAC,OU=Functions,OU=Administration,DC=contoso,DC=con,DC=local'
Import-Csv -Path = 'C:\Temp\Test\FUNC-X-CLOUD-AUDIT.csv'
Get-ADUser -Filter * -SearchBase $OUpath | Select-Object cn, samaccountname, mail, title, givenname, sn, whencreated | select cn, samaccountname, mail, title, givenname, sn, whencreated | Export-Csv -Path 'C:\Temp\Test\FUNC-X-CLOUD-AUDIT.csv'
Import-Csv : Cannot bind parameter 'Delimiter'. Cannot convert value "C:\Temp\Test\FUNC-X-CLOUD-AUDIT.csv" to type "System.Char". Error: "String
must be exactly one character long."
At line:2 char:20
+ Import-Csv -Path = 'C:\Temp\Test\FUNC-X-CLOUD-AUDIT.csv'
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Import-Csv], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.ImportCsvCommand
So this is the error I’m getting and how I’m using my logic to call the select objects. I’m also trying to get it in table format in the .csv
So i’m able to pipe out a .csv but there’s no information in it?