Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Run a Active Directory Admin query

Posted on 2013-01-31
7
Medium Priority
?
836 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
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

 

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 41

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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

In previous parts of this Nano Server deployment series, we learned how to create, deploy and configure Nano Server as a Hyper-V host. In this part, we will look for a clustering option. We will create a Hyper-V cluster of 3 Nano Server host nodes w…
Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
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…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

715 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