Solved

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

Posted on 2014-01-10
4
495 Views
Last Modified: 2014-01-10
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
0
Comment
Question by:mjm21
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 1

Expert Comment

by:Jobgeor
ID: 39771838
Get-ADUser -Filter * -SearchBase 'DC=aaaaaaa, DC=com' -Properties DisplayName | Export-CSV "ADUsers.csv"
0
 
LVL 40

Expert Comment

by:Adam Brown
ID: 39771871
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

0
 
LVL 53

Accepted Solution

by:
Will Szymkowski earned 500 total points
ID: 39771872
Use the below command to accomplish this...

import-module activedirectory
Get-ADUser -Filter * -Properties * | ? {$_.Title -like "*System*Administrators*"} | select Name, sAMAccountName, Title, OfficePhone, MobilePhone | out-file "c:\users.csv"

Open in new window


Will.
0
 

Author Comment

by:mjm21
ID: 39771914
Thanks Will ---- that did it....perfect!
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This article shows the method of using the Resultant Set of Policy Tool to locate Group Policy that applies a particular setting.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question