I'm currently looking into redirecting the default user and computer OU on a domain.
To my understanding, this can easily be achieved using
reditcmp. However, how can I retrieve the current state?
From PowerShell with the ActiveDirectory extensions loaded, run this command:
Then, using the list in kb324949, you can see what the values have been changed to.
Another way to retrieve that information in PowerShell is using the .Net DirectorySearcher class or as shown below PowerShell's [ADSISearcher] type accelerator. Although it's more typing and a bit harder to read, this method comes in handy if the Active Directory Web Services can't be guaranteed to be available. It's a bit less "PowerShell", but illustrates some useful PoSH/ADSI/LDAP syntax.
BTW, I'm not knocking longneck's answer, just point out an alternate way, tmtowtdi!
This is pretty low-tech, but you can create a user remotely using
You can do the same for a test computer by joining it to the domain and searching for that the same way you did the user.
There's probably some PowerShell voodoo you can do to look at container attributes, also - so I wouldn't be surprised if you get a better answer than this.