Sometimes when you create a Hyper-V virtual machine, you may name it with the incorrect name or no longer want to use it. This article will provide three methods to rename a Hyper-V virtual machine so that it uses the name you want.
RENAME YOUR CAMERA HYPER-V WITH F2 KEY
The easiest and fastest way to rename a Hyper-V virtual machine is to simply use the F2 function key on your keyboard while in Hyper-V Manager.
To do this, launch Hyper-V Manager by typingHyper-Vin the Start Menu’s search field and then selecting Hyper-V Manager when it appears as shown below.
Once Hyper-V Manager is open, simply left-click on the virtual machine you want to rename so that it is selected. Then pressthe F2 keyon your keyboard and the virtual machine name will become a field you can edit as shown below.
Now type the new name you want to use for the virtual machine and when done pressEnteron your keyboard. The virtual machine will now use the new name.
RENAME OF HYPER-V CAMERA WITH HYPER-V MANAGER’S SCENE MENU
To rename a Hyper-V virtual machine using Hyper-V Manager, follow these steps:
- Launch Hyper-V Manager by typingHyper-V in the Start Menu search field and then selecting Hyper-V Manager when it appears as shown below.
- When the Hyper-V manager opens, find the VM you want to rename and right-click on it so its context menu appears. As you can see from the image below, there is an option namedRename… . If this is the VM you want to rename, click Rename.
- The virtual machine name will now become a field you can edit. Just delete the current name and enter the new one you want to use.
- When done, press Enter on your keyboard and the virtual machine will use the new name
You can now close Hyper-V Manager.
RENAME OF CAMERA HYPER-V WITH POWERSHELL
For those who want to rename the Hyper-V virtual machine via the command line or through a script, you can use the PowerShell Rename-VM command to rename the machine. To rename a virtual machine using PowerShell, you can use the following steps:
- Start PowerShell as administrator by clicking the Start Menu button (
) and then select Windows PowerShell (Admin) as shown below.
- Once PowerShell opens, you can get a list of installed virtual machines by typingGet-VM and pressing Enter key on your keyboard. Get-VM command will give a virtual machine and their name.
- To rename a virtual machine, you need to use the Rename-VM command. This command takes two arguments, the name of the virtual machine to rename, and then the new name you want to rename it to. It’s important to note that when using a name that contains spaces, you need to put quotes around the name.For example, we will rename the Ubuntu virtual machine to Ubuntu Renamed. To do this, enter the commandRename-VM Ubuntu “Ubuntu Renamed” and press Enteron the keyboard.
- When PowerShell renames a virtual machine, it will not show any output. To see if the VM has been renamed, you can issue theGet-VM command .
- As you can see the VM has been renamed from Ubuntu to Ubuntu Rename. Now you can typeExit and press Enterto exit PowerShell.