This handy script is an easy way to return the DN of a user based on the sAMAccountName (aka username) that you give it. You can also provide wildcards. Usage: cscript DNname.vbs username eg. cscript DNname.vbs john.citizen Will return: “CN=john.citizen,OU=Standard,OU=Users,DC=domain,DC=com” eg. cscript DNname.vbs john* Will return: “CN=john.citizen,OU=Standard,OU=Users,DC=domain,DC=com” “CN=john.peterson,OU=Standard,OU=Users,DC=domain,DC=com” eg. cscript DNname.vbs *john* Will return: “CN=john.citizen,OU=Standard,OU=Users,DC=domain,DC=com” [...]