Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Import CSV matching givenName and sn

$
0
0

I'm really struggling to get a script working that will match givenName and sn from a csv against users in AD and then update the description field of the users based on what is in the csv.

Here is what I have so far,

Import-Csv c:\test.csv | Set-QADUser -SearchRoot "OU=TestOU,OU=Staff,OU=Users,OU=Company,DC=Company,DC=co,DC=uk" -Identity { '$_.givenName' -and '$_.sn' }

 

The csv is laid out,

descriptiongivenNamesn
12345testuser

Viewing all articles
Browse latest Browse all 6937

Trending Articles