Windows 10: Create Shortcut of Hyper-V Virtual Machine in Windows

Discus and support Create Shortcut of Hyper-V Virtual Machine in Windows in Windows 10 Tutorials to solve the problem; How to: Create Shortcut of Hyper-V Virtual Machine in Windows How to Create Shortcut of Hyper-V Virtual Machine in Windows 8 and 10 [img]... Discussion in 'Windows 10 Tutorials' started by Ztruker, Oct 9, 2014.

  1. Ztruker Win User

    Create Shortcut of Hyper-V Virtual Machine in Windows


    How to: Create Shortcut of Hyper-V Virtual Machine in Windows

    How to Create Shortcut of Hyper-V Virtual Machine in Windows 8 and 10


    Create Shortcut of Hyper-V Virtual Machine in Windows [​IMG]
    Note There's nothing wrong in running the Hyper-V Manager and launch your virtual machines from there. However, creating a shortcut for each vm you have you can start them fast simply by double clicking a shortcut on Desktop.

    If you want you can even set a vm to start every time you sign in to Windows. This tutorial will show you step by step how to do this.

    Video from Ten Forums Videos thread:




    Create Shortcut of Hyper-V Virtual Machine in Windows [​IMG]
    Note EDIT 31-AUG-2019

    Since this video was made, PowerShell security has changed. In video I demonstrate the short PS script in normal mode PS ISE, but today starting and stopping virtual machine from PowerShell requires elevated PS or PS ISE.

    Video is therefore outdated. I'll leave it here for posterity.




    Step One [/i] Create the Shortcut
    1.1) Right click Desktop, select New > Shortcut:

    Create Shortcut of Hyper-V Virtual Machine in Windows [​IMG]

    1.2) Click Browse, find and select the standalone Virtual Machine Connection executable vmconnect.exe in folder C:\Windows\System32\, click OK:

    Create Shortcut of Hyper-V Virtual Machine in Windows [​IMG]


    1.3) Add parameters to shortcut target path, in this case localhost (your Hyper-V host) followed by the name of the vm in quotes. In this example I create a shortcut for a Linux vm I have named as Cent OS 7 so I have to add localhost "Cent OS 7". Click Next:

    Create Shortcut of Hyper-V Virtual Machine in Windows [​IMG]

    1.4) Name the shortcut as you wish, click Finish:

    Create Shortcut of Hyper-V Virtual Machine in Windows [​IMG]



    Step Two [/i] Elevate the Shortcut
    2.1) The standalone Virtual Machine Connection must be run elevated, with built-in administrator rights. To do this right click your new shortcut and select Properties:

    Create Shortcut of Hyper-V Virtual Machine in Windows [​IMG]

    2.2) Select Shortcut tab, click Advanced:

    Create Shortcut of Hyper-V Virtual Machine in Windows [​IMG]


    2.3) Select Run as administrator, click OK, save Shortcut Properties by clicking OK:

    Create Shortcut of Hyper-V Virtual Machine in Windows [​IMG]

    2.4) Repeating this procedure for each of your virtual machines you can launch any of them simply by double clicking respective shortcut:

    Create Shortcut of Hyper-V Virtual Machine in Windows [​IMG]

    2.5) When you have launched the vm, start (boot) it from the Start button:

    Create Shortcut of Hyper-V Virtual Machine in Windows [​IMG]


    Create Shortcut of Hyper-V Virtual Machine in Windows [​IMG]
    Tip For advanced users:

    Because the shortcut is run with elevated admin rights, you get the UAC prompt every time you launch a vm from its shortcut:

    Create Shortcut of Hyper-V Virtual Machine in Windows [​IMG]

    To bypass UAC, see this tutorial on our sister site for creating an elevated task shortcut which runs the vm without UAC prompt: How to Create an Elevated Program Shortcut without a UAC Prompt in Windows.

    Kari


    Related Tutorials

    :)
     
    Ztruker, Oct 9, 2014
    #1
  2. BulldogXX Win User
    BulldogXX, Oct 9, 2014
    #2
  3. Rex99ny Win User
    Where is the Hyper V Manager, How to I start it ?

    I am trying to setup an XP virtual Machine on Windows 10 Pro.

    I followed the steps in Neil Peterson article of 5/9/2016.

    System Requirements - done - ok

    Install Hyper-V - done - ok

    Create a Virtual Switch - skip

    Create a Virtual Machine

    Create a Virtual Machine with Hyper-V Manager

    These steps walk through how to manually create a virtual machine and deploy an operating system to this virtual machine.


    • In Hyper-V Manager, click Action > New >
      Virtual Machine
      to bring up the New

    Uhhhhhhhhh - this step obviously implies one knows

    1) Where the Hyper-V Manager is

    2) How to start the Hyper-V Manager

    Isn't that odd ?
     
    Rex99ny, Oct 9, 2014
    #3
  4. Kari Win User

    Create Shortcut of Hyper-V Virtual Machine in Windows

    We need to use PowerShell for that.

    I have a short list of four more Hyper-V tutorials I will try to get ready before, as it looks now, I need to take a short break from the forums starting next week. This is one of the four, let's talk about this process shortly now.

    PowerShell and its "pimped" big brother PowerShell ISE are powerful native tools included in Windows. To put it very simple, PowerShell is an evolved Command Prompt. Instead of commands it uses so called Cmdlets, below a list of all Hyper-V related Cmdlets:

    Code: CommandType Name Version Source ----------- ---- ------- ------ Cmdlet Add-VMAssignableDevice 1.1 Hyper-V Cmdlet Add-VMDvdDrive 1.1 Hyper-V Cmdlet Add-VMFibreChannelHba 1.1 Hyper-V Cmdlet Add-VMHardDiskDrive 1.1 Hyper-V Cmdlet Add-VMMigrationNetwork 1.1 Hyper-V Cmdlet Add-VMNetworkAdapter 1.1 Hyper-V Cmdlet Add-VMNetworkAdapterAcl 1.1 Hyper-V Cmdlet Add-VMNetworkAdapterExtendedAcl 1.1 Hyper-V Cmdlet Add-VmNetworkAdapterRoutingDomainMapping 1.1 Hyper-V Cmdlet Add-VMRemoteFx3dVideoAdapter 1.1 Hyper-V Cmdlet Add-VMScsiController 1.1 Hyper-V Cmdlet Add-VMStoragePath 1.1 Hyper-V Cmdlet Add-VMSwitch 1.1 Hyper-V Cmdlet Add-VMSwitchExtensionPortFeature 1.1 Hyper-V Cmdlet Add-VMSwitchExtensionSwitchFeature 1.1 Hyper-V Cmdlet Checkpoint-VM 1.1 Hyper-V Cmdlet Compare-VM 1.1 Hyper-V Cmdlet Complete-VMFailover 1.1 Hyper-V Cmdlet Connect-VMNetworkAdapter 1.1 Hyper-V Cmdlet Connect-VMSan 1.1 Hyper-V Cmdlet Convert-VHD 1.1 Hyper-V Cmdlet Copy-VMFile 1.1 Hyper-V Cmdlet Debug-VM 1.1 Hyper-V Cmdlet Disable-VMEventing 1.1 Hyper-V Cmdlet Disable-VMIntegrationService 1.1 Hyper-V Cmdlet Disable-VMMigration 1.1 Hyper-V Cmdlet Disable-VMRemoteFXPhysicalVideoAdapter 1.1 Hyper-V Cmdlet Disable-VMResourceMetering 1.1 Hyper-V Cmdlet Disable-VMSwitchExtension 1.1 Hyper-V Cmdlet Disconnect-VMNetworkAdapter 1.1 Hyper-V Cmdlet Disconnect-VMSan 1.1 Hyper-V Cmdlet Dismount-VHD 1.1 Hyper-V Cmdlet Dismount-VMHostAssignableDevice 1.1 Hyper-V Cmdlet Enable-VMEventing 1.1 Hyper-V Cmdlet Enable-VMIntegrationService 1.1 Hyper-V Cmdlet Enable-VMMigration 1.1 Hyper-V Cmdlet Enable-VMRemoteFXPhysicalVideoAdapter 1.1 Hyper-V Cmdlet Enable-VMReplication 1.1 Hyper-V Cmdlet Enable-VMResourceMetering 1.1 Hyper-V Cmdlet Enable-VMSwitchExtension 1.1 Hyper-V Cmdlet Export-VM 1.1 Hyper-V Cmdlet Export-VMSnapshot 1.1 Hyper-V Cmdlet Get-VHD 1.1 Hyper-V Cmdlet Get-VM 1.1 Hyper-V Cmdlet Get-VMAssignableDevice 1.1 Hyper-V Cmdlet Get-VMBios 1.1 Hyper-V Cmdlet Get-VMComPort 1.1 Hyper-V Cmdlet Get-VMConnectAccess 1.1 Hyper-V Cmdlet Get-VMDvdDrive 1.1 Hyper-V Cmdlet Get-VMFibreChannelHba 1.1 Hyper-V Cmdlet Get-VMFirmware 1.1 Hyper-V Cmdlet Get-VMFloppyDiskDrive 1.1 Hyper-V Cmdlet Get-VMHardDiskDrive 1.1 Hyper-V Cmdlet Get-VMHost 1.1 Hyper-V Cmdlet Get-VMHostNumaNode 1.1 Hyper-V Cmdlet Get-VMHostNumaNodeStatus 1.1 Hyper-V Cmdlet Get-VMIdeController 1.1 Hyper-V Cmdlet Get-VMIntegrationService 1.1 Hyper-V Cmdlet Get-VMMemory 1.1 Hyper-V Cmdlet Get-VMMigrationNetwork 1.1 Hyper-V Cmdlet Get-VMNetworkAdapter 1.1 Hyper-V Cmdlet Get-VMNetworkAdapterAcl 1.1 Hyper-V Cmdlet Get-VMNetworkAdapterExtendedAcl 1.1 Hyper-V Cmdlet Get-VMNetworkAdapterFailoverConfiguration 1.1 Hyper-V Cmdlet Get-VmNetworkAdapterIsolation 1.1 Hyper-V Cmdlet Get-VMNetworkAdapterRoutingDomainMapping 1.1 Hyper-V Cmdlet Get-VMNetworkAdapterVlan 1.1 Hyper-V Cmdlet Get-VMProcessor 1.1 Hyper-V Cmdlet Get-VMRemoteFx3dVideoAdapter 1.1 Hyper-V Cmdlet Get-VMRemoteFXPhysicalVideoAdapter 1.1 Hyper-V Cmdlet Get-VMReplication 1.1 Hyper-V Cmdlet Get-VMReplicationAuthorizationEntry 1.1 Hyper-V Cmdlet Get-VMReplicationServer 1.1 Hyper-V Cmdlet Get-VMResourcePool 1.1 Hyper-V Cmdlet Get-VMSan 1.1 Hyper-V Cmdlet Get-VMScsiController 1.1 Hyper-V Cmdlet Get-VMSnapshot 1.1 Hyper-V Cmdlet Get-VMStoragePath 1.1 Hyper-V Cmdlet Get-VMSwitch 1.1 Hyper-V Cmdlet Get-VMSwitchExtension 1.1 Hyper-V Cmdlet Get-VMSwitchExtensionPortData 1.1 Hyper-V Cmdlet Get-VMSwitchExtensionPortFeature 1.1 Hyper-V Cmdlet Get-VMSwitchExtensionSwitchData 1.1 Hyper-V Cmdlet Get-VMSwitchExtensionSwitchFeature 1.1 Hyper-V Cmdlet Get-VMSystemSwitchExtension 1.1 Hyper-V Cmdlet Get-VMSystemSwitchExtensionPortFeature 1.1 Hyper-V Cmdlet Get-VMSystemSwitchExtensionSwitchFeature 1.1 Hyper-V Cmdlet Get-VMVideo 1.1 Hyper-V Cmdlet Grant-VMConnectAccess 1.1 Hyper-V Cmdlet Import-VM 1.1 Hyper-V Cmdlet Import-VMInitialReplication 1.1 Hyper-V Cmdlet Measure-VM 1.1 Hyper-V Cmdlet Measure-VMReplication 1.1 Hyper-V Cmdlet Measure-VMResourcePool 1.1 Hyper-V Cmdlet Merge-VHD 1.1 Hyper-V Cmdlet Mount-VHD 1.1 Hyper-V Cmdlet Mount-VMHostAssignableDevice 1.1 Hyper-V Cmdlet Move-VM 1.1 Hyper-V Cmdlet Move-VMStorage 1.1 Hyper-V Cmdlet New-VFD 1.1 Hyper-V Cmdlet New-VHD 1.1 Hyper-V Cmdlet New-VM 1.1 Hyper-V Cmdlet New-VMReplicationAuthorizationEntry 1.1 Hyper-V Cmdlet New-VMResourcePool 1.1 Hyper-V Cmdlet New-VMSan 1.1 Hyper-V Cmdlet New-VMSwitch 1.1 Hyper-V Cmdlet Optimize-VHD 1.1 Hyper-V Cmdlet Remove-VM 1.1 Hyper-V Cmdlet Remove-VMAssignableDevice 1.1 Hyper-V Cmdlet Remove-VMDvdDrive 1.1 Hyper-V Cmdlet Remove-VMFibreChannelHba 1.1 Hyper-V Cmdlet Remove-VMHardDiskDrive 1.1 Hyper-V Cmdlet Remove-VMMigrationNetwork 1.1 Hyper-V Cmdlet Remove-VMNetworkAdapter 1.1 Hyper-V Cmdlet Remove-VMNetworkAdapterAcl 1.1 Hyper-V Cmdlet Remove-VMNetworkAdapterExtendedAcl 1.1 Hyper-V Cmdlet Remove-VMNetworkAdapterRoutingDomainMapping 1.1 Hyper-V Cmdlet Remove-VMRemoteFx3dVideoAdapter 1.1 Hyper-V Cmdlet Remove-VMReplication 1.1 Hyper-V Cmdlet Remove-VMReplicationAuthorizationEntry 1.1 Hyper-V Cmdlet Remove-VMResourcePool 1.1 Hyper-V Cmdlet Remove-VMSan 1.1 Hyper-V Cmdlet Remove-VMSavedState 1.1 Hyper-V Cmdlet Remove-VMScsiController 1.1 Hyper-V Cmdlet Remove-VMSnapshot 1.1 Hyper-V Cmdlet Remove-VMStoragePath 1.1 Hyper-V Cmdlet Remove-VMSwitch 1.1 Hyper-V Cmdlet Remove-VMSwitchExtensionPortFeature 1.1 Hyper-V Cmdlet Remove-VMSwitchExtensionSwitchFeature 1.1 Hyper-V Cmdlet Rename-VM 1.1 Hyper-V Cmdlet Rename-VMNetworkAdapter 1.1 Hyper-V Cmdlet Rename-VMResourcePool 1.1 Hyper-V Cmdlet Rename-VMSan 1.1 Hyper-V Cmdlet Rename-VMSnapshot 1.1 Hyper-V Cmdlet Rename-VMSwitch 1.1 Hyper-V Cmdlet Repair-VM 1.1 Hyper-V Cmdlet Reset-VMReplicationStatistics 1.1 Hyper-V Cmdlet Reset-VMResourceMetering 1.1 Hyper-V Cmdlet Resize-VHD 1.1 Hyper-V Cmdlet Restart-VM 1.1 Hyper-V Cmdlet Restore-VMSnapshot 1.1 Hyper-V Cmdlet Resume-VM 1.1 Hyper-V Cmdlet Resume-VMReplication 1.1 Hyper-V Cmdlet Revoke-VMConnectAccess 1.1 Hyper-V Cmdlet Save-VM 1.1 Hyper-V Cmdlet Set-VHD 1.1 Hyper-V Cmdlet Set-VM 1.1 Hyper-V Cmdlet Set-VMBios 1.1 Hyper-V Cmdlet Set-VMComPort 1.1 Hyper-V Cmdlet Set-VMDvdDrive 1.1 Hyper-V Cmdlet Set-VMFibreChannelHba 1.1 Hyper-V Cmdlet Set-VMFirmware 1.1 Hyper-V Cmdlet Set-VMFloppyDiskDrive 1.1 Hyper-V Cmdlet Set-VMHardDiskDrive 1.1 Hyper-V Cmdlet Set-VMHost 1.1 Hyper-V Cmdlet Set-VMMemory 1.1 Hyper-V Cmdlet Set-VMMigrationNetwork 1.1 Hyper-V Cmdlet Set-VMNetworkAdapter 1.1 Hyper-V Cmdlet Set-VMNetworkAdapterFailoverConfiguration 1.1 Hyper-V Cmdlet Set-VmNetworkAdapterIsolation 1.1 Hyper-V Cmdlet Set-VmNetworkAdapterRoutingDomainMapping 1.1 Hyper-V Cmdlet Set-VMNetworkAdapterVlan 1.1 Hyper-V Cmdlet Set-VMProcessor 1.1 Hyper-V Cmdlet Set-VMRemoteFx3dVideoAdapter 1.1 Hyper-V Cmdlet Set-VMReplication 1.1 Hyper-V Cmdlet Set-VMReplicationAuthorizationEntry 1.1 Hyper-V Cmdlet Set-VMReplicationServer 1.1 Hyper-V Cmdlet Set-VMResourcePool 1.1 Hyper-V Cmdlet Set-VMSan 1.1 Hyper-V Cmdlet Set-VMSwitch 1.1 Hyper-V Cmdlet Set-VMSwitchExtensionPortFeature 1.1 Hyper-V Cmdlet Set-VMSwitchExtensionSwitchFeature 1.1 Hyper-V Cmdlet Set-VMVideo 1.1 Hyper-V Cmdlet Start-VM 1.1 Hyper-V Cmdlet Start-VMFailover 1.1 Hyper-V Cmdlet Start-VMInitialReplication 1.1 Hyper-V Cmdlet Stop-VM 1.1 Hyper-V Cmdlet Stop-VMFailover 1.1 Hyper-V Cmdlet Stop-VMInitialReplication 1.1 Hyper-V Cmdlet Stop-VMReplication 1.1 Hyper-V Cmdlet Suspend-VM 1.1 Hyper-V Cmdlet Suspend-VMReplication 1.1 Hyper-V Cmdlet Test-VHD 1.1 Hyper-V Cmdlet Test-VMNetworkAdapter 1.1 Hyper-V Cmdlet Test-VMReplicationConnection 1.1 Hyper-V Cmdlet Update-VMConfigurationVersion 1.1 Hyper-V[/quote] To list all our Hyper-V virtual machines in PowerShell we give a Cmdlet Get-VM. Although using PowerShell we do not need the Hyper-V Manager I have it opened here to show that when we start now, all virtual machines really are off as can also be seen from the Get-VM output in PowerShell:

    Create Shortcut of Hyper-V Virtual Machine in Windows [​IMG]

    To start a Hyper-V vm we need Cmdlet Start-VM "VM_Name". Here I started my "Ubuntu 14.04" vm:

    Create Shortcut of Hyper-V Virtual Machine in Windows [​IMG]

    As Hyper-V Manager now shows, the vm is started.

    One Cmdlet PowerShell does not have is a Cmdlet to connect to vm, open the vm window. For this we need to call a Command line command (the same we used in shortcuts), in this case command:
    Code: C:\Windows\System32\vmconnect.exe "Localhost" "Ubuntu 14.04"[/quote] To call Command line from PowerShell we need to use the Cmdlet cmd, then the /c switch to tell system we want to send parameters to Command line and as parameter give the preferred Command line command. Complicated!

    So, the final PowerShell call for Command line's help is:
    Code: cmd /c C:\Windows\System32\vmconnect.exe "Localhost" "Ubuntu 14.04"[/quote] This Cmdlet calls Command line to run the command we gave after the /c switch, which in our case now finally opens the vm, in other words connects to vm we have already started:

    Create Shortcut of Hyper-V Virtual Machine in Windows [​IMG]

    I need to make all above to a short and simple PowerShell script which can be launched from a shortcut; it is a completely different ballgame than this tutorial and may take a day or three before I have it done *Smile.
     
    Kari, Oct 9, 2014
    #4
  5. Cliff S New Member
    Another easy to follow tutorial @Kari*Biggrin

    I not only successfully created my Ubuntu 15.10 shortcut, I was able to customize it for the OS it was for(in this case Wily Werewolf).
    I went to Bing Images found me a small JPG image,
    opened it in Paint,
    and reduced the size, in this case to 256x149.

    I then "saved as" PNG(to convert to ICO in next step, a must)
    Then I went to ConvertICO.com - Convert PNG to ICO and ICO to PNG and converted it to ICO.

    Then I saved it on my system where it will never be moved, in my case a Theming Stuff library I have created long ago.

    Then I just went into the shortcuts properties, and changed the icon.

    And the results marked in the red square:

    Create Shortcut of Hyper-V Virtual Machine in Windows [​IMG]


    The PNG version:

    Create Shortcut of Hyper-V Virtual Machine in Windows [​IMG]


    Additional Info: You can pin it to Start too....
     
    Cliff S, Dec 4, 2015
    #5
  6. Cliff S New Member
    Here's a Windows 10 icon I created(the zipped file)
    Win10.ICO.zip

    What it looks like

    Create Shortcut of Hyper-V Virtual Machine in Windows [​IMG]
     
    Cliff S, Dec 4, 2015
    #6
  7. Kari Win User
    Nice work Cliff *Smile
     
    Kari, Dec 4, 2015
    #7
  8. Cliff S New Member

    Create Shortcut of Hyper-V Virtual Machine in Windows

    Thank's Kari. I made the Win10 one for you. My way of thanking you for the great tutorials and helping me get started.*Nerd
     
    Cliff S, Dec 4, 2015
    #8
  9. Cliff S New Member
    Hyper-V custom icon:
    Hyper-V.ico.zip

    How it looks( as PNG image)

    Create Shortcut of Hyper-V Virtual Machine in Windows [​IMG]


    Applied in Admin tools, Start Menu, and taskbar:

    EDIT to original post:
    Create a shortcut to desktop using the right-click-menu first.
    (changing the hard link icon causes SFC & DISM to see this as an unrepairable error, even though it has absolutely NO EFFECT on the system. I just hate unresolved errors*Smile)

    Then you can change THAT shortcuts icon and pin it to the taskbar if you like.

    I tried pinning the new icon to the start menu(like in the screenshot below from original post), but only the original icon from Control Panel\All Control Panel Items\Administrative Tools pops up there(which is also in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Administrative Tools).



    Create Shortcut of Hyper-V Virtual Machine in Windows [​IMG]
     
    Cliff S, Dec 4, 2015
    #9
  10. Cliff S New Member
    Finally add my custom icon for Insider preview(yup it took a while for me to get around to it*Redface)

    Create Shortcut of Hyper-V Virtual Machine in Windows [​IMG]

    Note: I only made my icons extra extra extra large to make it easier for you all to see them, for this post.
     
    Cliff S, Jan 21, 2016
    #10
  11. Cliff S New Member
    @Kari here are two CentOS icons I made for you:
    2 CentOS icons.zip

    Here are the PNG versions to show what they look like.

    Create Shortcut of Hyper-V Virtual Machine in Windows [​IMG]

    Create Shortcut of Hyper-V Virtual Machine in Windows [​IMG]
     
    Cliff S, Jan 21, 2016
    #11
  12. Kari Win User
    Thanks! I like them, especially the blue one.
     
  13. Cliff S New Member

    Create Shortcut of Hyper-V Virtual Machine in Windows

    You're welcome, the blue came out better, because the other was originally a gif with transparency, but after changing it to PNG then ICO it lost the transparency and got a white background.*Sad
     
    Cliff S, Jan 21, 2016
    #13
  14. flybynite Win User
    I know this is an old thread, but I think the original intent was forgotten. That is to start a Hyper-V virtual machine from a shortcut. I put all of these files I am about to relate into a folder called HyperV inside a folder on my C-drive called Customizations where I have various other stuff stored. So I have C:\Customizations\HyperV. My first file is StartVM.ps1 it has this code in it. My Hyper-V machine, I might add, is called test. Code: param([switch]$Elevated) function Test-Admin { $currentUser = New-Object Security.Principal.WindowsPrincipal $([Security.Principal.WindowsIdentity]::GetCurrent()) $currentUser.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator) } if ((Test-Admin) -eq $false) { if ($elevated) { # tried to elevate, did not work, aborting } else { Start-Process powershell.exe -Verb RunAs -ArgumentList ('-noprofile -noexit -file "{0}" -elevated' -f ($myinvocation.MyCommand.Definition)) } exit } 'running with full privileges' $t = '[DllImport("user32.dll")] public static extern bool ShowWindow(int handle, int state);' add-type -name win -member $t -namespace native [native.win]::ShowWindow(([System.Diagnostics.Process]::GetCurrentProcess() | Get-Process).MainWindowHandle, 0) Start-VM "test" cmd /c %SYSTEMROOT%\System32\vmconnect.exe localhost "test" | Out-Null Stop-VM "test" Stop-Process -processname powershell[/quote] My next file is StartVM.cmd, and it contains this Code: @REM [This code block detects if the script is running with ADMIN PRIVILEGES. If it isn't it pauses, and then quits.]echo OFFcls NET SESSION >nul 2>&1 IF %ERRORLEVEL% EQU 0 ( ECHO Administrator PRIVILEGES Detected! ) ELSE ( echo ######## ######## ######## ####### ######## echo ## ## ## ## ## ## ## ## ## echo ## ## ## ## ## ## ## ## ## echo ###### ######## ######## ## ## ######## echo ## ## ## ## ## ## ## ## ## echo ## ## ## ## ## ## ## ## ## echo ######## ## ## ## ## ####### ## ## echo. echo. echo ####### ERROR: ADMINISTRATOR PRIVILEGES REQUIRED ######### echo This script must be run as administrator to work properly! echo If you are seeing this right click on All_In_One.CMD and select "Run As Administrator." echo ########################################################## echo. PAUSE EXIT /B 1 ) @echo ON %~d0 cd %~d0%~p0 cls powershell "& "".\StartVM.ps1"""[/quote] My third file is for aesthetics so I will not see any command windows running in the background. It is VirtualMachine.vbs, and contains this Code: command = "powershell.exe -nologo -command %SYSTEMDRIVE%\Customizations\HyperV\StartVM.cmd"set shell = CreateObject("Wscript.Shell") shell.Run command,0[/quote] My fourth file is a shortcut to VirtualMachine.vbs. I named it VirtualMachine. I pinned it to the Start Menu, opened the file location, and set it to run as administrator. That is all there is to it. Be sure to change the name of the virtual machine in the code from my "test" to whatever you have named yours!
     
    flybynite, Aug 27, 2016
    #14
  15. SteveFL99 Win User
     
    SteveFL99, Oct 22, 2016
    #15
Thema:

Create Shortcut of Hyper-V Virtual Machine in Windows

Loading...
  1. Create Shortcut of Hyper-V Virtual Machine in Windows - Similar Threads - Create Shortcut Hyper

  2. Hyper V not connecting to virtual machine

    in Windows 10 BSOD Crashes and Debugging
    Hyper V not connecting to virtual machine: Suddenly, Hyper V would not connect to any Virtual Machine using the Virtual Machine Connection. I trying creating new VMs and nothing worked. I am using Windows 10 Education....
  3. Hyper-V - Optimizing Virtual Machines

    in Windows 10 Tutorials
    Hyper-V - Optimizing Virtual Machines: How to: Hyper-V - Optimizing Virtual Machines Running Windows on a virtual machine can naturally never be as fast as same version of Windows on same computer running on physical hardware. However, by tweaking virtual machine settings, you can greatly impact the speed and...
  4. Hyper-V Nested Virtualization: Run virtual machines on virtual machine

    in Windows 10 Tutorials
    Hyper-V Nested Virtualization: Run virtual machines on virtual machine: How to: Hyper-V Nested Virtualization: Run virtual machines on virtual machine [img] Information Nested Virtualization means that user can enable Hyper-V on existing virtual machines, and run virtual machines and Windows Sandbox on them. To make Nested Virtualization...
  5. Backing up Hyper-V Virtual Machines

    in Windows 10 Virtualization
    Backing up Hyper-V Virtual Machines: Hi, I was wondering if all I really need to do to backup activated virtual machines but not associated virtual hard drives is just to copy the virtual hard drive folder to another drive (or even one drive) . All I am really interested is in saving the machines which have...
  6. Virtual network is not created in Hyper-V

    in Windows 10 Virtualization
    Virtual network is not created in Hyper-V: Hi guys, I enabled Hyper-V feature in Windows 10 but unable to create a virtual switch. I tried to create private and internal types of virtual switch but every time the process stuck on "Applying changes". What could be the reason of that? Thank you. 61906
  7. Hyper-V - Create Custom Virtual Machine Gallery

    in Windows 10 Tutorials
    Hyper-V - Create Custom Virtual Machine Gallery: How to: Hyper-V - Create Custom Virtual Machine Gallery [img] Information Quick Create is a feature in Hyper-V allowing users to setup new virtual machines with a few mouse clicks. At the moment, Quick Create offers users a quick setup of Windows 10 Developer Environment,...
  8. Export Hyper-V Virtual Machine in Windows 10

    in Windows 10 Tutorials
    Export Hyper-V Virtual Machine in Windows 10: How to: Export Hyper-V Virtual Machine in Windows 10 How to Export Hyper-V Virtual Machines in Windows 10 Hyper-V enables running virtualized computer systems on top of a physical host. These virtualized systems (aka: guests) can be used and managed just as if they were...
  9. Hyper-V Quick Create - Create or Copy a Virtual Machine

    in Windows 10 Tutorials
    Hyper-V Quick Create - Create or Copy a Virtual Machine: How to: Hyper-V Quick Create - Create or Copy a Virtual Machine [img] Information Windows 10 Insider Preview Build 15002 gave a facelift to Hyper-V as told earlier on Ten Forums. One of the new cool things is a new feature in Hyper-V Manager called Quick Create. With it...
  10. Create Hyper-V Virtual Machine Connection shortcut in Windows 10

    in Windows 10 Tutorials
    Create Hyper-V Virtual Machine Connection shortcut in Windows 10: How to: Create Hyper-V Virtual Machine Connection shortcut in Windows 10 How to Create a Hyper-V Virtual Machine Connection shortcut in Windows 10 The Windows 10 Pro, Enterprise, and Education editions include the Hyper-V virtualization technology. Hyper-V enables...
Tags: