pc rename

G

Guest

Hi. Has anyone figured out a way of renaming multiple pc's in an active
directory domain? I have approximately 400 machines in different OU's that
need to conform to the new naming convention we are implementing. I have
found some scripts on how to rename a computer name and some scripts on
renaming the actual account in AD but I have not been able to combine the two
and to create a script that can rename the pc as well as it's account in AD.
Any help would be greatly appreciated.

Thanks,

Morne
 
S

Shenan Stanley

Morne said:
Hi. Has anyone figured out a way of renaming multiple pc's in an
active directory domain? I have approximately 400 machines in
different OU's that need to conform to the new naming convention we
are implementing. I have found some scripts on how to rename a
computer name and some scripts on renaming the actual account in AD
but I have not been able to combine the two and to create a script
that can rename the pc as well as it's account in AD. Any help would
be greatly appreciated.

The command netdom can rename a computer in an AD environment.
All you need to do is create a simple script.

For example, the following (if put in a batch script) would accept the old
computer name, new computer name, administrator username and password and
rename the "old computer name" to the new computer name.

netdom renamecomputer %1 /newname:%2 /userD:YOURDOMAIN\%3 /passwordD:%4
/userO:YOURDOMAIN\%3 /passwordO:%4 /force /reboot:60

In other words - if you put the above line (if it split, it is supposed to
be one single line) and replaced "YOURDOMAIN" with your actual domain name
and saved it as "rendompc.bat" - then when you called the script (for
example) - you would call it like this:

rendompc.bat OldPCName1 NewPCName1 administrator P455w0rd

The OldPCName1 would be renamed to NewPCName1 and rebooted after 60 seconds.
The name of the system and the name in active directory would be changed.

This works with Windows XP for sure - I don't THINK it would work with
Windows 2000 - but cannot recall.

You can create a script that contained the Old names, New names, username
and password for all the machines and run it.. Or have a list it reads
from - that would be better.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top