How to Rename a Hyper-V Virtual Machine using PowerShell & Hyper-V Manager

  • December 4, 2017
  • Read 1,242 times
 

Sometimes when you create a Hyper-V virtual machine, you may name it with a name that is not accurate or that you no longer wish to use. This article will provide three methods to rename a Hyper-V virtual machine so that it uses the name that you want.

Rename a Hyper-V virtual machine using the F2 Key

The easiest and quickest way to rename a Hyper-V virtual machine is to simply use the F2 function key on your keyboard while in the Hyper-V Manager.

To do this, launch Hyper-V Manager by typing Hyper-V in the Start Menu search field and then selecting Hyper-V Manager when it appears as shown below.

Start Hyper-V Manager

When Hyper-V Manager is open, simply single left-click on a VM that you wish to rename so that it becomes selected. Then press the F2 key on your keyboard and the virtual machine's name will become a field you can edit as shown below.

Edit Name

Now type the new name that you wish to use for the virtual machine and when done, press Enter on your keyboard. The Virtual Machine will now be using the new name.

Renamed VM

Rename a Hyper-V VM using its Hyper-V Manager Context Menu

To rename a Hyper-V virtual machine using Hyper-V Manager please follow these steps:

  1. Launch Hyper-V Manager by typing Hyper-V in the Start Menu search field and then selecting Hyper-V Manager when it appears as shown below.
     
    Start Hyper-V Manager

     
  2. Once Hyper-V manager opens, find the VM that you wish to rename and right-click on it so that its context menu appears. As you can see from the image below, there is an option named Rename.... If this is the VM you wish to rename, click on Rename.
     
    Rename Option

     
  3. The VM's name will now become a field you can edit. Simply erase the current name and enter the new name that you wish to use.
     
    Edit Name

     
  4. When done, press Enter on your keyboard and the virtual machine will now be using the new name
     
    Renamed

You can now close Hyper-V Manager.

Rename a Hyper-V virtual machine using PowerShell

For those who wish to rename a Hyper-V virtual machine via the command line or through scripts, you can use PowerShell Rename-VM command to rename the machine. To rename a VM using PowerShell you can use the following steps:

  1. Start PowerShell with Admin privileges by clicking on the Start Menu button (Windows Start menu button) and then selecting Windows PowerShell (Admin) as shown below.
  2. When PowerShell opens, you can get a list of install VMs by typing Get-VM and pressing the Enter key on the keyboard. The Get-VM command will out a put of virtual machines and their names.
     
    Get-VM PowerShell Command

     
  3. To rename a VM, you need to use the Rename-VM command. This command takes two arguments, the name of the VM to rename and then the new name you wish to rename it to. It is important to note that when using names that contain spaces, you need to put quotes around the name.

    For example, we are going to rename the Ubuntu virtual machine to Ubuntu Renamed. To do this, we enter the command Rename-VM Ubuntu "Ubuntu Renamed" and press Enter on the keyboard.
     
    Rename-VM PowerShell Command

     
  4. When PowerShell renames a virtual machine it will not display any output. To see if the VM has been renamed, you can issue the Get-VM command.
     
    VM Renamed

     
  5. As you can see the VM was renamed from Ubuntu to Ubuntu Renamed. You can now type Exit and press Enter to exit PowerShell.

 

Users who read this also read:

  • How to Enable CPU Virtualization in Your Computer's BIOS Image
    How to Enable CPU Virtualization in Your Computer's BIOS

    CPU Virtualization is a hardware feature found in all current AMD & Intel CPUs that allows a single processor to act as if it was multiple individual CPUs. This allows an operating system to more effectively & efficiently utilize the CPU power in the computer so that it runs faster. This feature is also a requirement for many virtual machine software and is required to be enabled in order ...

  • How to Install Hyper-V in Windows 10 Image
    How to Install Hyper-V in Windows 10

    Hyper-V is a virtual machine software solution that is included with Windows 10 Professional, Windows 10 Enterprise, and Windows Server that allows you to run multiple operating systems at once from within one instance of Windows. This tutorial will explain how to install Hyper-V in a supported version of Windows.

  • How to remove a Trojan, Virus, Worm, or other Malware Image
    How to remove a Trojan, Virus, Worm, or other Malware

    If you use a computer, read the newspaper, or watch the news, you will know about computer viruses or other malware. These are those malicious programs that once they infect your machine will start causing havoc on your computer. What many people do not know is that there are many different types of infections that are categorized in the general category of Malware.

  • How to start Windows in Safe Mode Image
    How to start Windows in Safe Mode

    Windows Safe Mode is a way of booting up your Windows operating system in order to run administrative and diagnostic tasks on your installation. When you boot into Safe Mode the operating system only loads the bare minimum of software that is required for the operating system to work. This mode of operating is designed to let you troubleshoot and run diagnostics on your computer. Windows Safe Mode ...

  • How to see hidden files in Windows Image
    How to see hidden files in Windows

    By default Windows hides certain files from being seen with Windows Explorer or My Computer. This is done to protect these files, which are usually system files, from accidentally being modified or deleted by the user. Unfortunately viruses, spyware, and hijackers often hide there files in this way making it hard to find them and then delete them.

 

Comments:

blog comments powered by Disqus

Login

Remember Me
Sign in anonymously