How to run a Hyper V VM from the command prompt

by Jun 1, 2020Software, Windows0 comments

How to run a Hyper V VM from the command prompt

Run and connect to a Hyper V virtual machine without Hyper V manager from the command prompt or with a shortcut using a simple powershell script 


Get-VM to get the names of the VMs

PS script:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force

start-vm -name “Your VM Name”

vmconnect.exe $Env:computername “Your VM Name”

CMD file:

powershell.exe powershell -Command “Start-Process PowerShell -Verb RunAs” %homedrive%%homepath%\Desktop\your-ps-script.ps1

Shortcut target:

powershell.exe %homedrive%%homepath%\Desktop\your-ps-script.ps1

Shortcut Start in:



Submit a Comment

Your email address will not be published. Required fields are marked *

Follow Me

Website created with DIVI. Get 10% discount with affiliate link below

Divi WordPress Theme

Stay Up to Date With The Latest News & Updates

Join Our Newsletter

A note to our visitors

This website has updated its privacy policy in compliance with changes to European Union data protection law, for all members globally. We’ve also updated our Privacy Policy to give you more information about your rights and responsibilities with respect to your privacy and personal information. Please read this to review the updates about which cookies we use and what information we collect on our site. By continuing to use this site, you are agreeing to our updated privacy policy.

Share This