Link to home
Start Free TrialLog in
Avatar of PBIT
PBITFlag for United States of America

asked on

How to export users out of Active Directory

Hello,

I like to export profiles out of active directory.  I see the Export List menu selection, when I do a right mouse click, but it only exports the organizational unit (OU) that you are at, and it does not export other OU, where I have the profiles.

Also, there are profiles, accounts and security groups that I don't want, but only active accounts and accounts for employees.  

How can I do this?
ASKER CERTIFIED SOLUTION
Avatar of bas2754
bas2754
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PBIT

ASKER

Get-ADUser -Filter * -SearchBase "DC=domain, DC=com" -Properties mail Export-CSV "EmailAddresses.csv"

I ran the above command, but PowerShell said the export-csv was an argument.  Can you tell me the argument that will get a CSV file?
Avatar of PBIT

ASKER

I figured it out.

Get-ADUser -Filter * -SearchBase "DC=domain, DC=com" -Properties department, displayname, officephone, mobilephone,

title, division, emailaddress, manager | export-csv "d:\scripts\data.csv"