Windows server 2003 – How to verify domain trust

Posted by aidas | Posted in Active directory, Command line, Tools, Windows 2003 | Posted on 07-05-2009

0

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) .

Windows server 2003 – How to remove your server from domain

Posted by aidas | Posted in Active directory, Command line, Tools, Windows 2003 | Posted on 07-05-2009

0

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) .

Windows server 2003 – How to rename your domain controller using alternate name

Posted by aidas | Posted in Active directory, Command line, Tools, Windows 2003 | Posted on 07-05-2009

0

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) .

Windows server 2003 – How to add alternate name to your domain controller

Posted by aidas | Posted in Active directory, Command line, Tools, Windows 2003 | Posted on 07-05-2009

0

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) .

Windows server 2003 and Windows XP – How to join server to domain via command line

Posted by aidas | Posted in Active directory, Command line, Windows 2003, Windows XP | Posted on 07-05-2009

0

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) .

Windows server 2003/2008 – How to check if your domain controller (DC) is healthy

Posted by aidas | Posted in Active directory, Command line, Windows 2003, Windows 2008 | Posted on 07-05-2009

0

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) .

Windows server 2008 – How to delete Active Directory snapshot

Posted by aidas | Posted in Active directory, Command line, Windows 2008 | Posted on 06-05-2009

0

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>}

Windows server 2008 – How to mount or unmount Active Directory snapshot

Posted by aidas | Posted in Active directory, Command line, Windows 2008 | Posted on 06-05-2009

0

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>}

Windows server 2008 – How to create Active Directory snapshot

Posted by aidas | Posted in Active directory, Command line, Windows 2008 | Posted on 06-05-2009

0

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.

Windows server 2008 – How to view domain trusts via command line

Posted by aidas | Posted in Active directory, Command line, Windows 2008 | Posted on 06-05-2009

0

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

Windows server 2008 – How to find domain controllers for your domain

Posted by aidas | Posted in Active directory, Command line, Windows 2008 | Posted on 06-05-2009

0

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.

Windows server 2008 – How to find group in Active Directory via command line

Posted by aidas | Posted in Active directory, Command line, Windows 2008 | Posted on 06-05-2009

0

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*