I'm having problem to rename all the PCs in company.
I found the sample script here
http://www.microsoft.com/technet/community/scriptcenter/compmgmt/scrcm36.mspx
but it works only on XP or 2003.
My clients are running on 2K Pro on 2K Domain.
Please help me, give sample on how to write the script, i totally have no
idea, plsssssss.
Thanks in Advance...JJ
Hi
A)
For Win2k (and WinXP clients), not break any domain membership:
If you have access to a Windows 2003 Server CD, get the netdom.exe that is in
the "Support Tools" install, and take a look at the RENAMECOMPUTER parameter.
Netdom.exe from this kit can be used for Win2k, WinXP as well as Win2k3.
C:\>C:\Win2k3SupportTools\Netdom.exe HELP RENAMECOMPUTER
The syntax of this command is:
NETDOM RENAMECOMPUTER machine /NewName:new-name
/UserD:user [/PasswordD:[password | *]]
[/UserO:user [/PasswordO:[password | *]]]
[/Force]
[/REBoot[:Time in seconds]]
NETDOM RENAMECOMPUTER renames a computer that is joined to a domain. The
computer object in the domain is also renamed. Certain services, such as the
Certificate Authority, rely on a fixed machine name. If any services of this
type are running on the target computer, then a computer name change would
have an adverse impact. This command should not be used to rename a domain
controller.
(snip)
B)
Renaming Windows 2000 domain computers without using the Win2k3 Server
version of Netdom.exe is difficult. You need to change the name updating
the registry directly (or use a 3rd party command line tool) and then do
a reboot. This will break the domain membership, so you would then after
the reboot need to add the computer to the domain again (using e.g. the
Win2k version of netdom.exe).
For the rename computer part:
Changing computer name for WNT/W2k/WXP with vbscript and registry writes,
alternatively with command line utility Compname.exe:
http://groups.google.com/groups?selm=3DBD6E02.F0D75A0%40hydro.com
Note that above methods will break any domain membership.
then using the Win2k version of Netdom.exe to join the computer to the
domain again:
http://groups.google.com/groups?selm=402AFB1E.B2D2F6F4%40hydro.com
To reboot the computer after the join, add /REBoot to
the command line of Netdom.exe.
--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx