sodcalculator

10 Tech How-To

Rename PC Remotely: Step-by-Step Guide

Guide 10-30561 · Updated · Step by step

This guide shows you how to rename a Windows PC remotely, whether it’s on your local network or over the internet. You’ll learn two reliable methods—using the built-in Remote Desktop Protocol (RDP) and PowerShell—and we’ll cover what to do if you run into permission or connectivity issues.

What You’ll Need

  • Administrator access on both the remote PC and the PC you’re working from.
  • The remote PC must be powered on and connected to the network.
  • For RDP method: Remote Desktop must be enabled on the remote PC (Settings > System > Remote Desktop).
  • For PowerShell method: PowerShell remoting must be enabled on the remote PC (Enable-PSRemoting).
  • The remote PC’s IP address or hostname, and your credentials (username and password).

Step-by-Step

Method 1: Using Remote Desktop (GUI)

  1. Connect to the remote PC. Press Win + R, type mstsc, and hit Enter. Enter the remote PC’s IP address or hostname, then click Connect. Log in with an account that has administrator privileges.
  2. Open System Properties. Once connected, right-click the Start button and select System. Alternatively, go to Settings > System > About.
  3. Rename the PC. In the System window, click Rename this PC (or Rename). Type the new computer name. Use only letters, numbers, and hyphens; no spaces or special characters.
  4. Restart. Click OK and then choose Restart Now when prompted. The rename takes effect after the restart.

Method 2: Using PowerShell (Command Line)

  1. Open PowerShell as Administrator. On your local PC, right-click the Start button and select Windows PowerShell (Admin) or Terminal (Admin).
  2. Enable PSRemoting (if not already). On the remote PC, you need to have PowerShell remoting enabled. You can do this by running Enable-PSRemoting -Force in an elevated PowerShell on that machine, or if you’re already connected via RDP, run it there.
  3. Run the Rename-Computer cmdlet. In your local PowerShell, type the following command, replacing REMOTE-PC with the remote PC’s name or IP, NEW-NAME with the desired new name, and DOMAIN\User with your admin credentials:
    Rename-Computer -ComputerName "REMOTE-PC" -NewName "NEW-NAME" -Force -Restart

    If you need to specify credentials, add the -Credential parameter:

    Rename-Computer -ComputerName "REMOTE-PC" -NewName "NEW-NAME" -Credential (Get-Credential) -Force -Restart
  4. Wait for the restart. The -Restart flag automatically restarts the remote PC. If you omit it, you’ll need to restart manually later.
  5. Verify. After the remote PC restarts, you can check the new name by running Rename-Computer -ComputerName "REMOTE-PC" -NewName "NEW-NAME" -WhatIf or simply ping the new name.

Common Mistakes

  • Not using an admin account. Both methods require administrative privileges on the remote PC. If you’re not an admin, the operation will fail with an access denied error.
  • Using invalid characters. Windows computer names can only contain letters (a-z, A-Z), numbers (0-9), and hyphens (-). Spaces, underscores, and other special characters are not allowed.
  • Forgetting to restart. The new name won’t take effect until the PC is restarted. If you skip the restart, the old name will still be active.
  • PowerShell remoting not enabled. If you try to use Rename-Computer without PSRemoting enabled, you’ll get an error like “The client cannot connect to the destination.”
  • Typo in IP or hostname. A simple typo in the remote PC’s address will prevent the connection. Double-check the address.

Tips

  • Use a naming convention. For example, include the department and location: FIN-NY-001 for Finance in New York. This makes it easier to identify PCs later.
  • Test the new name. After renaming, try to ping the new name from your local PC to confirm it’s reachable.
  • Do it during off-hours. Renaming forces a restart, which will disconnect any active sessions. Plan accordingly to avoid disrupting users.
  • Use a script for bulk renaming. If you have multiple PCs to rename, you can loop through a list of computer names in PowerShell.
  • Check DNS. After renaming, the old DNS record may linger. You can force a DNS update with ipconfig /registerdns on the remote PC.

Troubleshooting

Access Denied

If you get an “Access denied” error, ensure the account you’re using is a member of the local Administrators group on the remote PC. If you’re in a domain, you might need to use a domain admin account.

Cannot Connect to Remote PC

If the connection fails, check the following:

  • Is the remote PC powered on and connected to the network?
  • Is Remote Desktop enabled? (Settings > System > Remote Desktop)
  • Is the Windows Firewall blocking RDP? Ensure the “Remote Desktop” rule is enabled.
  • Are you using the correct IP address or hostname? Try pinging it.

PowerShell Remoting Error

If you get an error like “The WinRM client cannot process the request,” try the following:

  • Run Enable-PSRemoting -Force on the remote PC (requires admin).
  • Make sure the Windows Remote Management (WinRM) service is running on the remote PC.
  • Check that the network profile is set to Private (not Public) on the remote PC.

Rename Succeeded but Old Name Still Appears

This is usually because the PC hasn’t restarted. If it has restarted and the old name still shows in some places, it might be due to DNS caching. Run ipconfig /flushdns on your local PC, and ipconfig /registerdns on the remote PC.

Rename Failed with “The computer name is not valid”

This error means the new name contains invalid characters or is too long (max 15 characters). Ensure the name uses only letters, numbers, and hyphens.

Frequently Asked Questions

Can I rename a PC without restarting it?

No, Windows requires a restart to apply the new computer name. The rename operation will fail if you try to skip the restart.

Can I rename a PC remotely if it’s on a different network (over the internet)?

Yes, but you need to set up a VPN or use a remote access tool that supports it. The methods above work over the internet if you have a VPN connection or if the remote PC is reachable via RDP through port forwarding (not recommended for security).

Is it possible to rename multiple PCs at once?

Yes, you can use a PowerShell script that loops through a list of computer names and calls Rename-Computer for each one. This is useful for IT admins managing many devices.

What happens to the old computer name after renaming?

The old name is immediately released. Other devices on the network may still cache it for a short time, but it will eventually be replaced by the new name.

Can I rename a PC if I only have local admin rights, not domain admin?

Yes, as long as your account is an administrator on the remote PC, you can rename it. Domain admin rights are not required unless the PC is domain-joined and you need to update the AD record.

Does renaming a PC affect installed software or files?

No, renaming only changes the computer’s identification in the network and system. All installed software and files remain intact.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →