Rename a computer.
Syntax NETDOM RENAMECOMPUTER machine_name /NewName:new_name [/UserD:user] [/PasswordD:[password | *]] [/UserO:user] [/PasswordO:[password | *]] [/REBoot[:Time_in_seconds]] [/Force] [/SecurePasswordPrompt] Key: machine The name of the computer to be renamed new_name The new name for the computer. Both the DNS host label and the NetBIOS name are changed to new_name.
If new_name is longer than 15 characters, the NetBIOS name is
derived from the first 15 characters /UserD User account used to make the connection with the Domain. The domain can be specified as "/ud:domain\user". If domain is omitted, the computer's domain will be used. /PasswordD Password of the user account specified By /UserD. Specifying a * will prompt for the password. /UserO User account used to make the connection with the Machine to be renamed. By default the currently logged on user's account. The domain can be specified as "/uo:domain\user". If domain is omitted, a local computer account is assumed. /PasswordO Password of the user account specified By /UserO. Specifying a * will prompt for the password. /Force Do not prompt for confirmation. /REBoot Shutdown and automatically reboot the machine after the rename has completed. The number of seconds before automatic shutdown can also be provided. Default = 30 seconds /SecurePasswordPrompt Use secure credentials popup to specify credentials. This option should be used when smartcard credentials need to be specified. This option is only in effect when the password value is supplied as *
If the computer is joined to a domain, then the AD 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.
Netdom options can be abbreviated to just the UPPER case letters, e.g. /PasswordD can be supplied as just /PD
“We may dig in our heels and dare life never to change, but, all the same, it changes under our feet like sand under the feet of a sea gazer as the tide runs out. Life is forever undermining us. Life is forever washing away our castles, reminding us that they were, after all, only sand and sea water.” - Erica Jong (Parachutes and Kisses)
NETDOM COMPUTERNAME - Manage computer names
PowerShell: Set-ADComputer - Modify an AD computer object.
Rename Computers Using PowerShell and NetDom
Q298593 - Use Netdom to rename a computer in Windows XP