This post will show how to verify domain trust relationship in one-way and two-way trust cases. Lets say we have testdomain1.com and testdomain2.com domains with one-way trust established. To verify one-way domain trust open command line on your Windows server 2003 and type:
netdom trust /d:testdomain1.com testdomain2.com /verify
If we have two-way trust established to verify it type:
netdom trust /d:testdomain1.com testdomain2.com /verify /twoway
Note that netdom is part of Windows server 2003 support tools. They can be found on your OS CD (Support\Tools directory) .
This post will show you how to remove you server from domain using command line tool netdom. Lets say we want to remove server named “Testserver” from domain testdomain.com. To do it open command line on your Windows server 2003 and type:
netdom remove /d:testdomain.com testserver /ud:testdomain.com\Admin /pd:Pa$$w0rd
Note that netdom is part of Windows server 2003 support tools. They can be found on your OS CD (Support\Tools directory) .
This post will show you how to use command line to rename your domain controller to alternate name. Note that alternate name must be available for DC we want to operate against. Lets say you have domain controller named “TestDC1″ with alternate name “TestDC2″ assigned to it. If you want to make “TestDC2″ primary name for your domain controller open command line on your Windows server 2003 and type:
netdom TestDC1 dc /makeprimary:TestDC2.testdomain.com
Note that netdom is part of Windows server 2003 support tools. They can be found on your OS CD (Support\Tools directory) .
This post will show you how to use command line tool netdom and add alternate name to your domain controller running on Windows server 2003. Lets say we have domain controller named “TestDC1.testdomain.com” and we want to add alternate name “TestDC2″. To do it open command line and type:
netdom TestDC1 dc /add:TestDC2.testdomain.com
Note that netdom is part of Windows server 2003 support tools. They can be found on your OS CD (Support\Tools directory) .
This post will show you how to join member server to domain and place it to specific organizational unit (OU) using command line. Lets say we have server named “Testserver” and it must be joined to domain testdomain.com. Also we want to place it in OU named “servers”. To do it open command line on your Windows server 2003 and type:
netdom add /d:testdomain.com testserver /OU:OU=servers,DC=testdomain,DC=com
Note that netdom is part of Windows server 2003 support tools. They can be found on your OS CD (Support\Tools directory) .
This post will show you how to check if your domain controller is healthy and is functioning in right way. Lets say we want to run check against server named “TestDC”. For this we will use domain admin account “testadmin” with password “Pa$$w0rd”. To start check open command line on your Windows server 2003 and type:
dcdiag /s:TestDC /u:testdomain.com\testadmin /p:*
After you will hit Enter password prompt will appear.
Note that dcdiag is part of Windows server 2003 support tools. They can be found on your OS CD (Support\Tools) .
This post will show you how to delete Active Directory snapshot using command line on your Windows server 2008. Snapshot is a copy of active directory which contains active directory database and log files and it can be viewed without starting server in Directory Services Restore Mode.
To list all available snaphosts on server type:
ntdsutil press Enter
snapshot press Enter
list all press Enter
You will see all available snapshots with specific GUID {…..} . Make sure that snapshot, you are going to delete, is unmounted. If it is mounted unmount it by typing:
unmount {<GUID>}
To delete snapshot type:
delete {<GUID>}
This post will show you how to mount or unmount Active Directory snapshot using command line on your Windows server 2008. Snapshot is a copy of active directory which contains active directory database and log files and it can be viewed without starting server in Directory Services Restore Mode.
To list all available snaphosts on server type:
ntdsutil press Enter
snapshot press Enter
list all press Enter
You will see all available snapshots with specific GUID {…..} . To mount snapshot note GUID of snapshot you would like to mount and type:
mount {<GUID>}
To unmount snapshot type:
unmount {<GUID>}
This post will show you how to create Active Directory snapshot using command line on your Windows server 2008. Snapshot is a copy of active directory which contains active directory database and log files. Snapshot can be viewed without starting server in Directory Services Restore Mode.
Before creating snapshot you need to set AD as active instance. To do it open command line and type:
ntdsutil press Enter
activate instance NTDS press Enter
Now you are ready to create snapshot:
snapshot press Enter
create press Enter
You will see in output that snapshot was generated successfully.
This post will show you how to view existing domain trust relationships for your domain using command line. To do it open command line on your Windows server 2008 and type:
nltest /domain_trusts
If you want to list all domain controllers for your domain using command line this how to is for you. To list all DC for domain testdomain.com open command line in your Windows server 2008 and type:
nltest /dclist:testdomain.com
This command will also show you which server holds PDC role.
This post will show you how to find group in Active Directory using command line on your Windows server 2008.
Lets say you want to list all groups in your domain testdomain.com. To do it open command line and type:
dsquery group domainroot
If you want to find all groups those name starts with “test” type:
dsquery group domainroot -name test*