Level 1
0 / 100 XP

Rename a Computer Answer

Rename a Remote Computer

In this lecture I will show you how to rename a computer using PowerShell.

For demonstration purposes I have created another VM. When you initially setup Windows on your VM, Microsoft will name the computer something like "DESKTOP-ABC123."

From Your VM, open PowerShell ISE in admin mode.

Step 1: Get the Current Computer Name using the hostname command.

# Get the current computer name

  • Type Hostname

The hostname command is executed, and it retrieves the current computer's name.

Go ahead and copy and paste or type the Rename-computer command into PowerShell

** # For Example Rename the computer DESKTOP-ABC123**

  • Rename-Computer -NewName "VSC3" -Restart

In this next step, We will use the Rename-Computer cmdlet to rename the computer to "VSC3."

The -NewName parameter specifies the new computer name.

The -Restart parameter automatically restarts the computer after the rename. Go ahead and press return.

Step 2: Verify the Computer Name using the Hostname command

Type Hostname and verify that the new computer name is now VSC3