Sometimes it is easy to actually come up with content, other times not so much. This is one that it took a bit of finding but it was something I got stuck on.
How do you get the Active Directory Schema information without remote desktop/console access. Now there are other ways to do this, but i was looking for a simple console scripted method. NTDSUTIL has the power to do this via a simple script
First an example
C:\Documents and Settings\smcgroarty>ntdsutil
ntdsutil:
Notice that the command prompt, it will continue to change for each section that you are in
ntdsutil: domain management
domain management:
domain management: connection
server connections: connect to server DCSRV1
Binding to DCSRV1…
Connected to DCSRV1using credentials of locally logged in user.
server connections: quit
domain management: select operation target
select operation target: list roles for connected server
Server "DCSRV1" knows about 5 roles
Schema - CN=NTDS Settings,CN=DCSRV2,CN=Servers,CN=Sites,CN=Configuration,DC=velcrohurts,DC=com Domain - CN=NTDS Settings,CN=DCSRV2,CN=Servers,CN=Sites,CN=Configuration,DC=velcrohurts,DC=com
PDC - CN=NTDS Settings,CN=DCSRV2,CN=Servers,CN=Sites,CN=Configuration,DC=velcrohurts,DC=com
RID - CN=NTDS Settings,CN=DCSRV2,CN=Servers,CN=Sites,CN=Configuration,DC=velcrohurts,DC=com
Infrastructure - CN=NTDS Settings,CN=DCSRV2,CN=Servers,CN=Sites,CN=Configuration,DC=velcrohurts,DC=com
select operation target:
After you get the values, you need to type quit, for each step.
select operation target: quit
domain management: quit
nntdsutil: quit
C:\Documents and Settings\smcgroarty>
Now to put this in a simple batch file:
ntdsutil domain management connection connect to server DCSRV1 quit select operation target “list roles for connected server” quit quit quit
Thanks the quick and dirty of it, hope someone finds this useful