Solved

Run a Active Directory Admin query

Posted on 2013-01-31
7
822 Views
Last Modified: 2013-02-08
In AD Powershell how can I pull a report to show me all ADMINs in AD and export to csv?

Thanks in advance.
0
Comment
Question by:Twhite0909
7 Comments
 
LVL 16

Expert Comment

by:Rajitha Chimmani
ID: 38841308
What kind of administrators are you looking at? And what is the version 2003 or 2008?
0
 

Author Comment

by:Twhite0909
ID: 38842441
AD 2008 and I basically want to find any user account with any type of admin a cess besides local admin
0
 
LVL 17

Expert Comment

by:Premkumar Yogeswaran
ID: 38843292
Hi,

This will pull you the groups and members of administrator and child group or user if any...

get-adgroupmember -Identity administrators  -recursive

To export to csv

get-adgroupmember -Identity administrators  -recursive  | export-csv c:\temp\admin_members.csv

Open in new window


Regards,
Prem
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:Twhite0909
ID: 38844276
It says completed successfully but in RED so looks like an error also it exported the file but it is 0KB.

Here is the syntax I got after the cmd ran

Get-ADGroupMember : The operation completed successfully
At line:1 char:18
+ get-adgroupmember <<<<  -Identity administrators  -recursive  | export-csv c:
\temp\admin_members.csv
    + CategoryInfo          : NotSpecified: (administrators:ADGroup) [Get-ADGr
   oupMember], ADException
    + FullyQualifiedErrorId : The operation completed successfully,Microsoft.A
   ctiveDirectory.Management.Commands.GetADGroupMember
0
 
LVL 39

Expert Comment

by:footech
ID: 38845788
That command should work for you.  Check the permissions of the user you're running under.
0
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 38855393
If you are looking for delegation details of OU's then you may try this..

Create Active Directory Delegations Report with PowerGUI
http://www.shariqsheikh.com/blog/index.php/201006/create-active-directory-delegations-report-with-powergui/

Or try Get-DsAcl function by Chris Dent
http://www.indented.co.uk/index.php/2009/10/02/get-dsacl/
0
 

Author Comment

by:Twhite0909
ID: 38868647
I've requested that this question be closed as follows:

Accepted answer: 500 points for Subsun's comment #a38855393
Assisted answer: 0 points for Twhite0909's comment #a38844276

for the following reason:

Answer was received from another source
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This script checks a path to see if a folder exists. If the folder does exist you will get output "The folder has previously been created. No action taken" If not it will create the folder. Then adds one user modify permission to the folder. It …
Create and license users in Office 365 in bulk based on a CSV file. A step-by-step guide with PowerShell script examples.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now