Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Get-ADUser -Filter {(mail -ne "null") -and (Enabled -eq "true")} -Properties GivenName,Surname,title,mail,mobile,company,city,manager | Select GivenName,Surname,title,mail,mobile,company,city,@{n=’manager’; e= { ( $_.manager | % { (Get-ADObject $_).Name }) -join “,” }} | Export-CSV "C:\Export.csv" -NoTypeInformation -Encoding UTF8
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement