?
Solved

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

Posted on 2014-01-10
4
Medium Priority
?
499 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 42

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 2000 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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month13 days, 13 hours left to enroll

801 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