How to Manage Active Directory Computers. Part 2: Rename and Join Computers to the Domain

Computer accounts or objects represent devices connected to the AD. They are stored in AD database after connecting to the domain. This is needed to apply different GPOs to them and keep track of their updates if you have WSUS installed. And what is more important establish secure authentication for users logging into Windows.

In order to join a workstation to a domain, the device needs to be in the same network with domain controllers. It is also possible to join a device through a VPN. In this case device needs to be able to resolve the name of the AD environment. DHCP can definitely help with that but you can also do this by adding the domain information to the hosts file.

How to Join a Computer to the Domain

It is possible to join a computer to the domain in three different ways, lets see how to do this on practice.

Joining the Domain with the GUI

In order to join a Windows server to AD, perform the following steps:

Rightclick on Start button or press the Start button on your keyboard and the X key simultaneously, and select System. Scroll down till the bottom and click on “System Info”. After that click on “Change settings” next to Computer name, and in appeared window click Change…

In Domain changes window type the DNS domain name under “Member of Domain” and click OK. Enter domain admin credentials, and click OK three times.

Click Close and then Restart Now. Congratulations, your workstation has joined the domain!

Joining Domain Using Windows PowerShell

The easiest way to add a Windows-based device to an Active Directory is Powershell and Add-Computer cmdlet:

Add-Computer -DomainName office.com -Credential OFFICE\Administrator

How to Rename a Computer Account

Renaming a computer is pretty easy task to accomplish, it can be done three different ways.

Renaming Computer in the Settings

In Windows Server it can be done similar to joining into the domain but this time we will do it a little bit differently.

Rightclick on Start button or press the Start button on your keyboard and the X key simultaneously, and select System. Click on Rename this PC and enter new name for your device according to your naming policy.

Click Next, enter your domain admin credentials if your computer is already inside the domain and then restart your server. You will have a server with new name after the restart.

Renaming Computer in the Cmd.exe

Renaming computer in command prompt is an easy task, just type in the following code on the target computer:

netdom.exe renamecomputer localhost /newname WKS033 /reboot

Renaming Computer with Windows PowerShell

Windows PowerShell allows to rename a computer in seconds by typing two short commands on a target machine:

Rename-Computer WKS001