Quantcast
Channel: PowerShell – Marc Valk dot Net
Viewing all articles
Browse latest Browse all 16

Exporting AD users with email

$
0
0

To export all active directory users and their email addresses  from a certain OU (ie. finance) to a comma seperated file, use the following PowerShell command

Get-ADUser -filter * -SearchBase 'OU=Finance,DC=contoso,DC=com' -properties Emailaddress | select-object Name, emailaddress | Export-Csv c:\users.csv

Viewing all articles
Browse latest Browse all 16

Latest Images

Trending Articles





Latest Images