Saturday 30 January 2016

adding/renaming a group of computers to domain (ZT)

Remotely add a group of PCs into the Domain.

Example : After ghosting several PCs, you will need to rename each PC, and join each PC to the domain.
You can join all of the PCs to the domain by using a vbs script = "addmachine.vbs".

This vbscript will make use of "netdom.exe"to add the PC into the domain.

Create a text file with a list of Computernames that you want to add to the domain eg. "the.txt".

Put all three files = "netdom.exe" , "addmachine.vbs", "the.txt" into the same folder eg. C:\

You need to edit the script before you can use it :-

You need to know in which OU the PC is located in the domain eg.
> Students Machine > Teaching Facility > PCLAB > PCLAB2 in Domain: Computing
Replace the "username" and "password" with the correct domain username and password.
Replace the "pcusername" and "pcpassword" with the correct PC local administrator's username and password.
Edit the correct path to the.txt. eg. > file1 = "c:\netdompc2\the.txt"

To run it > open up Command Prompt, and type > cscript addmachine.vbs
Remotely reboot the PCs after successful completion (eg. reboot.bat).

No comments:

Post a Comment