Export Active Directory SIDs

Useful for finding specific SIDs such as -500 for Administrator -501 for Guest etc.

dsquery * -filter “&(&(objectClass=User)(objectCategory=Person))” -limit
0 -attr sAMAccountName givenName sn objectSID 

Information on well known SIDs below



Using PowerShell to retrieve workstations and/or servers from AD


Get-ADComputer -Filter {OperatingSystem -Like “*server*”} -Property * | Format-Table Name,OperatingSystem,OperatingSystemServicePack -Wrap -Auto


Get-ADComputer -Filter {OperatingSystem -NotLike “*server*”} -Property * | Format-Table Name,OperatingSystem,OperatingSystemServicePack -Wrap -Auto


Get-ADComputer -Filter * -Property * | Format-Table Name,OperatingSystem,OperatingSystemServicePack -Wrap -Auto

Inventorying Computers with AD PowerShell



Group Policy Modelling “The given Key was not present in the dictionary”

I found this recently when running GPO modelling and there is a Microsoft article that describes the symptom caused by using the GPO registry wizard to import registry settings.


Unfortunately I was not able to find a quick way and had to look through all GPOs for the Registry Wizard Values key.  Underneath this key, the offending item has a blank type/ value name.


Troubleshoot AD lockout of a user account


This application will identify on which DCs lockouts are occurring.  Find the DC and look at the security event logs for event id 4771.  General information will give the user name and source IP address/port number of the offender.

The following script may also be useful in troubleshooting