How to Change the Computer Name for a Local or Remote PC

How-to-Change-the-Computer-Name-for-a-Local-or-Remote-PC-from-the-Command-Line
A computer name is normally valued for the purposes of identifying who uses the computer or where it’s located. One may use the name Laptop to differentiate between another on a network called Desktop. Similarly, if an entire family or company is on the same network, using their name or department is a common practice.

We’ll look at two ways to change the computer name of a local computer and also how to make a change remotely, within a local network, for if you’re a system admin with the desire to change a computer name short of having to gain physical access.

Cool Tip: Here’s how to find the current computer name with nothing but the command prompt.

Change the Computer Name for a Local Computer

We’ll look at two ways of changing the computer name for a local computer. The first is the conventional way and the second involves using the command prompt.

1. Using System Properties

From the start menu, right-click Computer and choose Properties.

Open-computer-properties-in-Windows

The current computer name is displayed in the Computer name, domain, and workgroup settings section. Click Change settings to change the computer name.

Change-the-computer-name-in-Windows

Under the Computer Name tab, select Change on the bottom to rename the computer.

Change-the-computer-name-in-Windows

Make the name change and save all the open windows by pressing OK. A reboot is now necessary, and the following screen will indicate such.

Change-the-computer-name-in-Windows

Note: Spaces are not allowed for a computer name, so a hyphen is the usual replacement.

As also indicated by System Properties, the changes will occur after restarting the computer.

Reboot-the-computer-after-changing-the-computer-name

2. Using the Command Prompt

Open Command Prompt from the start menu. The following command needs to be executed:

WMIC computersystem where caption=’CURRENT‘ rename NEW

However, replace the bolded words with real values. Here’s an example:

WMIC computersystem where caption=’Jon-Desktop‘ rename Jon

Change-the-computer-name-from-the-command-line

The result will simply be a change in the computer name from Jon-Desktop to Jon. You’ll know the command completed successfully if the ReturnValue is equal to zero.

A reboot is necessary for the changes to take effect.

Change the Computer Name for a Remote Computer

If you’re a domain admin and want to change a computer on the same network to a new name, use the following format:

WMIC /node:”CURRENT” computersystem call rename “NEW

For example:

WMIC /node:”Jon-Laptop” computersystem call rename “LaptopPC

The value following /node: indicates the name of the remote computer on the LAN. You need to have admin rights on the remote computer or the following error will ensue, indicating Access is denied:

Change-the-computer-name-for-a-remote-computer-from-the-command-line

If the user you’re currently logged in with doesn’t have administrative access to a networked computer, you can explicitly define credentials using this format:

WMIC /node:”CURRENT” /user:USERNAME /password:PASSWORD computersystem call rename “NEW

For example:

WMIC /node:”Jon-Laptop” /user:Admin /password:password123 computersystem call rename “LaptopPC

Change-the-computer-name-for-a-remote-computer-from-the-command-line

Conclusion

Changing computer names is essential if you have two of identical names on a network. Otherwise, it’s simply an easy way to identify the user or location (like Upstairs-PC or Laptop). Use the above methods when you want to do it. If you know of easier methods, the comments section awaits your insights.