Solved

Run a Active Directory Admin query

Posted on 2013-01-31
7
830 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
[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
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
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 

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 40

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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
Windows 10 came with  a lot of built in applications, Some organisations leave them there, some will control them using GPO's. This Article is useful for those who do not want to have any applications in their image (example:me).
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

726 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