Windows 10: Hyper-V Windows 10 Batch file to start/stop VM on command

Discus and support Hyper-V Windows 10 Batch file to start/stop VM on command in Windows 10 Virtualization to solve the problem; I am running Hyper-V on Windows 10. I am using the PC for media playback / gaming in big screen and rarely see the desktop. I have an service... Discussion in 'Windows 10 Virtualization' started by TheBuz, Mar 26, 2016.

  1. TheBuz Win User

    Hyper-V Windows 10 Batch file to start/stop VM on command


    I am running Hyper-V on Windows 10.

    I am using the PC for media playback / gaming in big screen and rarely see the desktop. I have an service running and APP on my phone, so i can start batch files and programs without the need for a KB/M.

    I have just setup a VM, but i dont want it running all the time, i just want to use it to do some video rendering or whatever when i need it to, i especially don't want it to be running when playing games.

    so is there a way i could write a batch file or VBS to start the VM (not connect) then i could connect to VM via remote desktop on my laptop (or other machine)

    and another batch file to turn it off, when i want to do some gaming?

    i have googled for about an hour but came up empty *Sad

    :)
     
    TheBuz, Mar 26, 2016
    #1
  2. PMCmikem Win User

    Windows 10 Hyper-V PCI Passthrough

    Does anyone know if you can pass a PCI device from the Host machine to a VM? I am using Windows 10 Hyper-V. I am trying to pass a PCI device to a windows 10 VM. Is this possible through the built-in Hyper-V manager in Windows 10. I read somewhere where
    Hyper-V in Server 2016 has a Discrete Device Assignment that allows this, but couldn't find anything on Windows 10 Hyper-V.
     
    PMCmikem, Mar 26, 2016
    #2
  3. HairyFool Win User
    can windows 10 pro host virtual machines?

    Yes Windows 10 Pro does support Hyper-V and it is not significantly different from earlier versions.

    1st you need to enable Hyper-V in Windows. Go to Control Panel - Programs and Features - Add or Remove Windows features and activate Hyper-V

    Open the Start Menu and type Hyper-V to show the management tool. Start the manager, select your PC and use the New option to build a VM computer.
     
    HairyFool, Mar 26, 2016
    #3
  4. Kari Win User

    Hyper-V Windows 10 Batch file to start/stop VM on command

    The script shown in this video does exactly that:

    [youtube]qdX_E0Wq-p4[/youtube]
     
  5. flybynite Win User
    When you make Kari's powershell script put this Code: Stop-Process -processname powershell[/quote] as the last line, and powershell will exit when you close the Virtual Machine window!
     
    flybynite, Mar 28, 2016
    #5
  6. Kari Win User
    as the last line, and powershell will exit when you close the Virtual Machine window![/quote] Totally unnecessary.

    The video shows two ways to launch the PowerShell script, a normal shortcut and a bit more "elegant" VB script. Both ways will terminate the PowerShell process as soon as the user has closed vm window and the script has shut down the vm.

    If any additional commands would have been needed, I had added them in my instructions.
     
    Kari, Apr 5, 2018
    #6
Thema:

Hyper-V Windows 10 Batch file to start/stop VM on command

Loading...
  1. Hyper-V Windows 10 Batch file to start/stop VM on command - Similar Threads - Hyper Batch file

  2. Hyper-V VM can't ping another Hyper-V VM

    in Windows 10 Gaming
    Hyper-V VM can't ping another Hyper-V VM: Hello all,I've been working on a lab network attempting to perform a test live migration. Here is my current setup:Host 1: STAN- VM COSTELLOHost 2: OLLIE Joined to the Domain- VM ABBOTT Current Domain Controller DNS ServerI have set static IP addresses for all of these...
  3. Hyper-V VM can't ping another Hyper-V VM

    in Windows 10 Software and Apps
    Hyper-V VM can't ping another Hyper-V VM: Hello all,I've been working on a lab network attempting to perform a test live migration. Here is my current setup:Host 1: STAN- VM COSTELLOHost 2: OLLIE Joined to the Domain- VM ABBOTT Current Domain Controller DNS ServerI have set static IP addresses for all of these...
  4. How to Start & Stop Hyper-V VM using PowerShell

    in Windows 10 News
    How to Start & Stop Hyper-V VM using PowerShell: [IMG]After you install or enable Hyper-V on your Windows 11 or Windows 10 host machine, you can create VMs to run a different operating system (guest OS) for various purposes. In this post, we will show you how to Start & Stop Hyper-V VM using PowerShell. How to Start & Stop...
  5. Unable to start any VM in Hyper V in Windows 10

    in Windows 10 BSOD Crashes and Debugging
    Unable to start any VM in Hyper V in Windows 10: [FrCtUtilities::UpdateFRCTFilesTime@2226] Caught exception: The system cannot find the file specified. 0x80070002 vm\service\fr\frctutilities.cpp2223\vmms.exe!00007FF6629FE63F: caller: 00007FF662D6B76A Exception3 tid146c 80070002 The system cannot find the file specified....
  6. Hyper-V VM

    in Windows 10 Updates and Activation
    Hyper-V VM: With the Hyper-V session running on my local machine. Am I allowed to create a VM using the DVD I used on the machine? https://answers.microsoft.com/en-us/windows/forum/all/hyper-v-vm/2b8f2e09-28ab-4e98-bba3-f835ac67d542"
  7. Questions on Windows 10 licensing for a Hyper-V VM

    in Windows 10 Virtualization
    Questions on Windows 10 licensing for a Hyper-V VM: I have a Windows 10 Pro machine which supports virtualization. I want to create a hyper-V VM running Windows 10 as the guest host. I have some questions on licensing and any activation issues that might occur I expect I'll need to buy a 2nd Win 10 license Does it need...
  8. How to install Windows 10 on Hyper-V VM?

    in Windows 10 Virtualization
    How to install Windows 10 on Hyper-V VM?: If there is a tutorial already, I cannot find it here as most of the hyper-V references are about getting Hyper-V working. I have: - Physical Notebook running Windows 10 Home (with key of course) - Physical Notebook running Window 10 Edu (with key of course) - Hyper-V...
  9. Exporting VM with hyper-v

    in Windows 10 Virtualization
    Exporting VM with hyper-v: When you export a VM with Hyper-v, does the exported VM retain the same hardware identifier as the original? I know with VMware, when you open up a backed up VM, you select "I moved it" to retain hardware identifier, and "I copied it" if you want a new identifier. Is it...
  10. Hyper-V problem with starting a VM (Windows 10 Enterprise 64bit .1607)

    in Windows 10 Virtualization
    Hyper-V problem with starting a VM (Windows 10 Enterprise 64bit .1607): Hello, i've been experiencing problems with Hyper-V since last weeks thursday (09-03-2017, DD-MM-YYYY) trying to run it on Windows 10 Enterprise 64 bit (up to date) with Hyper-V enabled. For some reason Hyper-V doesn't want to start any VM from my Windows 10 Enterprise...
Tags:

Users found this page by searching for:

  1. write a batch script to start vm in local machine

    ,
  2. batch file start hyper-v vm

    ,
  3. windows 10 hyper-v connect from batch

    ,
  4. how to stop and start vm in command hyper-v,
  5. HOW TO WRITE AS SCRIPT TO START THE AND STOP THE VM FROM MY LAPTOP