Quantcast
Channel: PowerShell General
Viewing all articles
Browse latest Browse all 10624

Export user where the name is not the same of the givenname

$
0
0

Hi

I want to export the list of my users but only the one that don't have the same givenName and the sn. Because I have generic users so I don't want them in my list

 

Get-ADUser -Filter * -Properties * | Select-Object -Property sn,SamAccountName,givenName | Export-Csv -path c:\userall.csv -Encoding Unicode


Viewing all articles
Browse latest Browse all 10624

Trending Articles