Changing IP and Computer Name of a Domain Controller

Sometimes it is necessary to change the IP address assigned to a domain controller, especially if you want to change the network address or after a Server Migration.

First, you may need to check the DC health by executing the DCDIAG command (always run as Administrator)

Then, you can change the IP address as necessary;

Now the IP address has been changed, we need to empty the local DNS cache and register the DC’s new IP address in DNS.

  1. In the PowerShell box, run ipconfig /flushdns to remove any cached DNS entries created by the local DNS resolver.
  2. Run ipconfig /registerdns to ensure the new IP address is registered by the DNS server.
  3. Run dcdiag /fix to update Service Principal Name (SPN) records and check that all the tests are passed successfully.

If you have a distributed AD DS / DNS infrastructure, you may need to wait for DNS information to replicate or force a replication. If present, sub-net information in AD Sites and Services should be updated if the subnet addressing scheme is also modified.

Changing the Hostname as necessary;

Renaming a DC by using netdom commands is the preferred method. It requires that the domain functional level be at least Windows Server 2003.

  1. Open an administrative command prompt.
  2. Type netdom computername /add:
    For example, if you are renaming a DC from OldDC01 to NewDC01, you would type netdom computername OldDC01 /add: NewDC01
    This command adds a second entry to the list of computer names used by the DC.
  3. Type netdom computername /makeprimary:NewDC01
    This command designates the new name as the DC’s primary computer name.
  4. Reboot the server.
  5. When the server comes back up, open an administrative command prompt.
  6. Type netdom computername /remove:OldDC01
    This command removes the old name from the list of computer names used by the DC.

To update the FRS or DFS-R member object, perform the following steps;

  1. Open Active Directory Users and Computers.
  2. From the View menu, select Advanced Features.
  3. If SYSVOL is replicated using the File Replication System:
    Expand System > File Replication Service > Domain System Volume (SYSVOL Share).
    If SYSVOL is replicated using Distributed File System Replication (DFS-R):
    Expand System > DFSR-GlobalSettings > Domain System Volume > Topology.
  4. Right-click the object corresponding to the DC’s old name and select Rename.
  5. Type the DC’s new name and hit Enter.

Patch VMware ESXi hosts using command line

There a several ways to patch a VMware ESXi server. vSphere Update Manager (VUM) can update for example a complete ESXi host cluster fully automatic. vSphere Update Manager requires a vCenter Server. When you don’t have a vCenter Server patching can be done from the command line.

Here is a quick overview how to patch an ESXi host;

Step 1. Download the latest patch bundle from the VMware Web site, link

Step 2. Upload the patch bundle (zip) to a datastore with the vSphere Client or using vSphere Web Client.

Step 3. Enable SSH (Start the SSH service and make a SSH session to the ESXi host).

Step 4. Put the host in maintenance mode.

Step 5. Install the patch bundle

NOTE: Using esxcli with the install method has the possibility of overwriting existing drivers. If you are using third-party ESXi images, VMware recommends using the update method to prevent an unbootable state. The following command will install the patch bunde:
Install: esxcli software vib install -d /vmfs/volumes/datastore/vibbundle.zip

Update: esxcli software vib update -d /vmfs/volumes/datastore/vibbundle.zip

NOTES:

  • In the above given example, we have used (-d) switch to install the bundle, if you wish to install an individual VIB you may use the (-v) switch instead of (-d).
  • The volume and the related datastore information can be retrived through the Vsphere client.

Step 6. After the successful Installation, you may reboot the host and remove the Maintenance Mode.