Windows 10, Windows 8.1 and Windows 8 come with Client Hyper-V so you can run a supported guest operating system inside a Virtual Machine. Hyper-V is Microsoft's native hypervisor for Windows. It was originally developed for Windows Server 2008 and then ported to Windows client OS. It has improved over time and is present in the latest Windows 10 release as well. Today, we will see how to create a shortcut to start a Hyper-V VM in Windows 10.
Note: Only Windows 10 Pro, Enterprise, and Education editions include the Hyper-V virtualization technology.
What is Hyper-V
Hyper-V is Microsoft's very own virtualization solution that allows creating virtual machines on x86-64 systems running Windows. Hyper-V was first released alongside Windows Server 2008, and has been available without additional charge since Windows Server 2012 and Windows 8. Windows 8 was the first Windows client operating system to include hardware virtualization support natively. With Windows 8.1, Hyper-V has got a number of enhancements such as Enhanced Session Mode, enabling high fidelity graphics for connections to VMs using the RDP protocol, and USB redirection which is enabled from the host to VMs. Windows 10 brings further enhancements to the native hypervisor offering, including:
- Hot add and remove for memory and network adapters.
- Windows PowerShell Direct – the ability to run commands inside a virtual machine from the host operating system.
- Linux secure boot - Ubuntu 14.04 and later, and SUSE Linux Enterprise Server 12 OS offerings running on generation 2 virtual machines are now able to boot with the secure boot option enabled.
- Hyper-V Manager Down-level management - Hyper-V manager can manage computers running Hyper-V on Windows Server 2012, Windows Server 2012 R2 and Windows 8.1.
Create a shortcut for a Hyper-V VM
Unfortunately, the Hyper-V Manager app doesn't allow the user to create a shortcut for a virtual machine of choice. Having such a shortcut is very convenient. By clicking on it, you can start your virtual machine directly without opening Hyper-V Manager.
As you may already know, Hyper-V can be managed with PowerShell. There are plenty of cmdlets that can be used to change the Hyper-V configuration and options for existing virtual machines. There is a special cmdlet,
Start-VM "VM name", that can be used to turn on the desired virtual machine. However, there is no cmdlet to open the GUI for that VM.
Here is how to bypass this limitation.
To create a shortcut for a Hyper-V virtual machine,
Step 1 Create a new batch file with the following content:
@echo off set VMNAME="Windows 10" powershell.exe -ExecutionPolicy Bypass -Command "Start-VM \"%VMNAME%"\"" vmconnect.exe 127.0.0.1 %VMNAME%
Save it to any folder, e.g.
Step 2 Modify the line
set VMNAME="Windows 10", replace the "Windows 10" portion with your virtual machine name.
Step 3 Create a shortcut for your batch file and place on the Desktop.
Step 4 Open the shortcut properties dialog. On the Shortcut tab, click on the Advanced button.
Step 5 In the next dialog, turn on the option Run as administrator. Click Apply and OK to close shortcut properties.
You are done! Now, double-click the shortcut you created and confirm the UAC prompt. This will start your VM and open its GUI.
Now, you can change the shortcut icon, move this shortcut to any convenient location, pin it to taskbar or to Start, add to All apps or add to Quick Launch (see how to enable Quick Launch). You can also assign a global hotkey to your shortcut.
If you are not happy to confirm the UAC prompt every time you open the shortcut, you need to create a special task in the Windows Task Scheduler which allows executing apps with admin privileges. See the following article:
Create elevated shortcut to skip UAC prompt in Windows 10
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!
2 thoughts on “Create Shortcut for Hyper-V Virtual Machine in Windows 10”
Very nice! Thank you.
You are most welcome David