renaming a PC in a domain

K

-Karl

Ina NT4 & AD domain, is there any script to rename a PC? We have to
touch over 500 PC's and if we can script it, then we would like to do
that instead...

I know you can change the registry settings but what is the preferred
method in a domain for NT4 & AD?
 
C

Carey Frisch [MVP]

Workstation Name Changer
http://mystuff.clarke.co.nz/wsname.html

--
Carey Frisch
Microsoft MVP
Windows XP - Shell/User
Microsoft Newsgroups

Get Windows XP Service Pack 2 with Advanced Security Technologies:
http://www.microsoft.com/athome/security/protect/windowsxp/choose.mspx

-------------------------------------------------------------------------------------------

:

| Ina NT4 & AD domain, is there any script to rename a PC? We have to
| touch over 500 PC's and if we can script it, then we would like to do
| that instead...
|
| I know you can change the registry settings but what is the preferred
| method in a domain for NT4 & AD?
 
K

-Karl

Thank you. However, is there a MS supported tool? Using tools like
this is uncertain and I have to be very careful with what tools we use.

Trust is small unless it's from MS. Then I have some trust.
 
S

Shenan Stanley

Karl said:
Thank you. However, is there a MS supported tool? Using
tools like this is uncertain and I have to be very careful
with what tools we use.

NETDOM can rename a PC in a domain...

I'm using NETDOM v5.2.3687.0.

The batch script I have written to do it is:

:: -------- start script here --------
@ECHO OFF
if "%1" EQU "/?" goto helptext
if "%1" EQU "" goto helptext

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

:helptext
CLS
@ECHO.
@ECHO This script will rename a computer in the domain.
@ECHO It WILL reboot said computer.
@ECHO.
@ECHO The syntax for this script is:
@ECHO.
@ECHO rendompc OLDCOMPNAME NEWCOMPNAME DOMAIN_ADMIN_USERNAME DOMAIN_PASSWORD
@ECHO.
@ECHO Where:
@ECHO.
@ECHO OLDCOMPNAME is the old NETBIOS name of the computer.
@ECHO NEWCOMPNAME is the new NETBIOS name of the computer.
@ECHO DOMAIN_ADMIN_USERNAME is a Domain Administrative Username - just the
username.
@ECHO DOMAIN_PASSWORD is the Domain Administrative Username's password.
@ECHO.
PAUSE

:end
:: -------- end script here --------

Of course, you said NT4 domain, if you meant that - this may not help.
(It could be adapted with for/do statements easily enough, this one just
renames a single PC from a command prompt.)
 

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