Ying Li at myITforum.com

PowerShell & System Center

PowerShell script to find all the .admin users in AD

Let's say every user (in IT) has two accounts - one is their regular user account and the other is their admin account. It could be in the form of xyz.admin(or any other format). How you go about searching your active directory and find all the .admin accounts?

it couldn't be easier than this:

Get-QADUser -ldapFilter '(SamAccountName=*.admin)'|export-csv admins.csv

Of course, you need to have PowerShell Commands for Active Directory from Quest installed first!

Comments

No Comments