Thursday, April 15, 2010

Add Workstations To The Domain – Batch File

Here is an easy procedure to add computers to the Domain from an input file.  I am using the Netdom command to join the computer.  You can add all your computer names to the Computers.txt file.


Here is the Computer.txt file format:




How the authentication will work,
do we need to provide credentials for the each workgroup computer?


As you use these two lines :
FOR /f %%i in (C:\Computers.txt) DO (
netdom join /d:infralab.local %%i /OU:OU=Test,DC=infralab,DC=local

But where do I put my domain name here?

This comment has been removed by the author.

your netdom command has wrong syntax
the correct one must be:
netdom join %%i /d:infralab.local /OU:OU=Test,DC=infralab,DC=local

Do you run this from domain controller?

Post a Comment

Popular Posts


Twitter Delicious Facebook Digg Stumbleupon Favorites More