NETDOM ComputerName (Windows Server 2003/2008/R2/2012 + Windows 7/8)

Manage the primary and alternate names for a computer, Netdom can safely rename a domain controller or a server.

Syntax
      NETDOM COMPUTERNAME machine [/UserO:user] [/PasswordO:[password | *]]
         [/UserD:user] [/PasswordD:[password | *]] [/SecurePasswordPrompt]
           /Add:new_alternate_DNS_name | /Remove:alternate_DNS_name
              | /MakePrimary:computer_dns_name |
                 /Enumerate[:{AlternateNames | PrimaryName | AllNames}] | /Verify

Key:
   machine     The name of the computer whose names are to be managed.

   /UserO      User account used to make the connection with the Machine to be
               managed

   /PasswordO  Password of the user account specified By /UserO.
               Specifying a * will prompt for the password.

   /UserD      User account used to make the connection with the Domain of
               the machine to be managed

   /PasswordD  Password of the user account specified By /UserD.
               Specifying a * will prompt for the password.

   /Add        Add a new alternate name. The new name must be a fully qualified
               DNS name(FQDN - computer name followed by primary DNS suffix,
               such as comp1.example.com.).

   /REMove     Remove an existing alternate name. The name being removed must be
               a fully qualified DNS name (FQDN - computer name followed by
               primary DNS suffix, such as comp1.example.com.).

   /MakePrimary Make an existing alternate name into the primary name.
                The name being made primary must be a fully qualified DNS name
                (FQDN - computer name followed by primary DNS suffix, such as comp1.example.com.).

   /ENUMerate  List the specified names. It defaults to AllNames.

   /Verify     Check if there is a DNS A record and an SPN for each computer name. 

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

Netdom options can be abbreviated to just the UPPER case letters, e.g. /PasswordD can be supplied as just /PD

"It's not whether you get knocked down; it's whether you get back up." ~ Vince Lombardi

Related:

NETDOM QUERY - Query the domain for information
Q298593 - Use Netdom to rename a computer in Windows XP
Q216393 - Resetting computer accounts in Windows


© Copyright SS64.com 1999-2014
Some rights reserved