How to rename Hyper-V virtual machines using PowerShell and Hyper-V Manager
Sometimes when you create a Hyper-V virtual machine, you must give it a name and sometimes the naming is incorrect or simply you no longer want to use that name. This article will provide three methods to rename a Hyper-V virtual machine to your liking.
Change the Hyper-V virtual machine name using the F2 key
The easiest and fastest way to rename Hyper-V virtual machines is to simply use the F2 function key on the keyboard in the Hyper-V Manager.
To do this, launch the Hyper-V Manager by entering Hyper-V into the Start search field and then selecting Hyper-V Manager when it appears as shown below.
When Hyper-V Manager is opened, just left-click on the virtual machine you want to rename to select. Then press F2 key on the keyboard and the virtual machine name will become an editable field as shown below.
Now type the new name you want to use for the virtual machine and when done, press Enter on the keyboard. The virtual machine will now use the new name.
Rename a Hyper-V virtual machine using the Hyper-V Manager Context Menu
To rename a Hyper-V virtual machine using Hyper-V Manager, follow these steps:
1. Launch Hyper-V Manager by typing Hyper-V in the Start search field and then selecting Hyper-V Manager when it appears as shown below.
2. When the Hyper-V manager opens, find the virtual machine you want to rename and right-click it so that the virtual machine's context menu appears. As you can see in the picture below, there is an option called Rename . If this is the virtual machine you want to rename, click Rename .
3. The virtual machine name will now become a field you can edit. Just delete the current name and enter the new name you want to use.
4. When done, press Enter and the virtual machine will use the new name
You can now close the Hyper-V Manager.
Change the Hyper-V virtual machine name using Powershell
For those who want to rename Hyper-V virtual machines via the command line or through a script, you can use the PowerShell Rename-VM command to rename the virtual machine. To rename the virtual machine using PowerShell, follow these steps:
1. Start PowerShell with administrative rights by clicking the Start button and then selecting Windows PowerShell (Admin) as shown below.
2. When PowerShell opens, you can get the list of installed virtual machines by typing Get-VM and pressing the Enter key on the keyboard. The Get-VM command will give a virtual machine and their names.
3. 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 change. It is important to note that when using names containing spaces, you need to put quotation marks around the name. For example, we will rename the Ubuntu virtual machine to Ubuntu Renamed. To do this, enter the following command and press Enter on the keyboard:
Rename-VM Ubuntu "Ubuntu Renamed"
4. When PowerShell renames a virtual machine, it will not display any results. To see if the VM has been renamed, you can issue the Get-VM command.
5. As you can see the virtual machine has been renamed from Ubuntu to Ubuntu Renamed. Now you can type Exit and press Enter to exit PowerShell.
See more:
- Create virtual machines in Hyper-V on Windows Server 2008
- Create and configure virtual machines in Hyper-V
- Create your own cloud using Hyper-V
You should read it
- How to export Hyper-V virtual machines in Windows 10
- How to import Hyper-V virtual machines in Windows 10
- Create virtual machines with Hyper-V on Windows 8 and Windows 10
- How to check if your computer is running Windows 10 Hyper-V?
- Create virtual machines in Hyper-V on Windows Server 2008
- Instructions for installing Hyper-V
- Monitor Hyper-V with the command line (Part 1): Install the monitoring library
- Instructions for using Hyper-V on Windows 8 (Part 1)
- Monitor Hyper-V with the command line (Part 2): Basic monitoring commands
- Use the Virtual Machine Manager to quickly deploy Hyper-V
- Configure Hyper-V security using Authorization Manager - Part 2
- Monitor Hyper-V with the command line (Part 4)
Maybe you are interested
Microsoft's official Windows 11 virtual machine is no longer available
How to set virtual wallpaper for video calling on Mac
Why is Virtual Desktop the most underrated feature on Chromebooks?
The future of the virtual currency and bitcoin industry will be more favorable if Former President Donald Trump is re-elected
Xiaomi's AI virtual assistant can recommend recipes based on images of ingredients
What is VPN? Advantages and disadvantages of VPN virtual private network