Solved

Run a Active Directory Admin query

Posted on 2013-01-31
7
834 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
IoT Devices - Fast, Cheap or Secure…Pick Two

The IoT market is growing at a rapid pace and manufacturers are under pressure to quickly provide new products. Can you be sure that your devices do what they're supposed to do, while still being secure?

 

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

Are You Headed to Black Hat USA 2017?

Getting ready for Black Hat next week? Kick things off with the WatchGuard Badge Challenge and test your puzzle and cipher skills. Do you have what it takes to earn our limited edition Firebox Badge? Get started today - https://crimsonthorn.net

Question has a verified solution.

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

A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

623 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