High-Privileged Accounts
Hello,

I would like to know if there is a powershell cmdlet or script that lists all High-Privileged Accounts in an Active Directory domain?

Thank you.
February 3rd, 2015 4:09am

You have to define what you mean. Do you need a script that will list actual permissions on any object in AD?

Or membership of builtin groups like enterprise admins or domain admins?

Free Windows Admin Tool Kit Click here and download it now
February 3rd, 2015 4:17am

The two if possible.
February 3rd, 2015 5:36am

"High-Priviliged Accounts" are generally considered to be those accounts that belong to an AdminSDHolder group.

This command:

Get-ADUser -Filter {admincount -ne '0'} 

will return the users that have had their admincount property incremented by having been added to one of these groups.

You can read more about AdminSDHolder here:

https://technet.microsoft.com/en-us/magazine/2009.09.sdadminholder.aspx

Free Windows Admin Tool Kit Click here and download it now
February 3rd, 2015 6:32am

Thank you.

Is their a way to redirected the command's output to a .csv file, to get the result in a table.

February 3rd, 2015 8:15am

You do that like this:

Get-ADUser -Filter {admincount -ne '0'} | Export-CSV c:\somedir\somefilename.csv

That's very basic Powershell usage that would be covered in any Powershell tutorial.  

We're here to help people learn Powershell, but they need to put forth some effort themselves.  We can't just write scripts for you.

Free Windows Admin Tool Kit Click here and download it now
February 3rd, 2015 8:28am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics