Re: Change Computer Name Remotely

From: Torgeir Bakken \(MVP\) (Torgeir.Bakken-spam_at_hydro.com)
Date: 12/30/04


Date: Thu, 30 Dec 2004 22:44:44 +0100

Desmond Lee wrote:

> A computer name, locally or remotely, cannot simply be changed while the
> machine is still part of a Windows domain. It must be unjoined (to a
> workgroup) before this is supported.
Hi

This is not correct, you can rename the computer without unjoining it first.

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.

It also looks like the netdom.exe that comes with the updated WinXP SP2
version of support tools have this setting included now.

Windows XP Service Pack 2 Support Tools
http://www.microsoft.com/downloads/details.aspx?FamilyID=49ae8576-9bb9-4126-9761-ba8011fabf38

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)

With VBScript, you can also use the Rename method in WMI class
Win32_ComputerSystem (not remotely though)
http://msdn.microsoft.com/library/en-us/wmisdk/wmi/rename_method_in_class_win32_computersystem.asp

-- 
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


Relevant Pages

  • Re: Rename Domain utility
    ... > I'm trying to rename a Windows 2003 domain and the documentation ... > indicates to create a new zone to support the new domain name. ... You would have to rename it accordingly to your new domain. ...
    (microsoft.public.win2000.dns)
  • RE: Changing Netbios name
    ... 822590 Exchange System Attendant Does Not Start After You Rename a Windows ... Microsoft Online Partner Support ...
    (microsoft.public.windows.server.migration)
  • Cant delete or rename long file names in Windows XP Pro
    ... As far as I can tell from Googling this issue, Windows XP is supposed to support ... whenever I go to delete or rename a long file (near as ... title...mp3 Usually all I want in my folders are the song title. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Domain Rename and Exchange
    ... even then there is no support for Exchange... ... If you introduce NT 4 back and then remove Windows 2000 DC then rename NT ...
    (microsoft.public.windows.server.setup)
  • Re: older games dont work
    ... the support of my work have it and will burn a CD to me. ... and any other tips to make this game works will be great. ... Windows 95 including but not limited to: ... to map a pedal as a control ...
    (microsoft.public.windowsxp.games)