Grabbing the User Container string from Active Directory

Active-directory

Ever wondered how to get the exact User Container String for your user OU in active directory? A lot of software needs this for things like single sign and such. Here’s how to do it quickly:

dsquery ou domainroot > c:\string.txt

This should give you a text file in the root of the C: drive called string.txt. Open that text file and you will see all the strings to each container. Select the correct container and copy and paste the line. Its a nice quick way of getting it I’ve found to do it accurately instead of struggling to create the link manually. Original source