Wednesday 14 June 2017

List all SIDs

need to run this using admin privileges via windows PowerShell cmd

Get-ADUser -Filter * -SearchBase "ou=Sales,ou=West,dc=MyDomain,dc=com" |  Select sAMAccountName, SID

ex: Get-ADUser -Filter * -SearchBase "ou=users,ou=department,dc=yourdomain,dc=com" |  Select sAMAccountName, SID

0 comments: