Solved

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

Posted on 2014-01-10
4
494 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
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 39

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
AD architecture diagram 5 33
Extend AD schema for SCCM 2012 3 26
AD and SQL Server 2016 2 27
Server 2012 r2 licensing CALs 3 46
OfficeMate Freezes on login or does not load after login credentials are input.
This article explains the steps required to use the default Photos screensaver to display branding/corporate images
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

840 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