Link to home
Start Free TrialLog in
Avatar of mjm21
mjm21Flag for United States of America

asked on

Powershell / QuestCommandlets script that would extract user account information to a .CSV File

Powershell / QuestCommandlets script that would extract user account information to a .CSV File.

These are the items:

"Job Title" for the system administrators only
"phone"    for the system administrators only
Avatar of Jobgeor
Jobgeor

Get-ADUser -Filter * -SearchBase 'DC=aaaaaaa, DC=com' -Properties DisplayName | Export-CSV "ADUsers.csv"
Avatar of Adam Brown
This depends on how you're assigning system administrators. If you want to get info from Domain Admins, you would run a check against the domain admins group to see which users are in it, then pull data from those user accounts. Something like this should do it:

get-qadgroupmember "domain admins" | get-qaduser | select displayname,phonenumber,title | export-csv <location to save CSV file>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Will Szymkowski
Will Szymkowski
Flag of Canada 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 mjm21

ASKER

Thanks Will ---- that did it....perfect!