PBIT
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?
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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"
Get-ADUser -Filter * -SearchBase "DC=domain, DC=com" -Properties department, displayname, officephone, mobilephone,
title, division, emailaddress, manager | export-csv "d:\scripts\data.csv"
ASKER
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?