PowerShell: Change Automatic Start Action on Hyper-V VM`s

To easy change Automatic Start Action on all runnings VM´s on your Hyper-V server run this command:

Get-VM | Where { $_.State –eq ‘Running’ } | Set-VM -AutomaticStartAction StartIfRunning

To validate it run this command:

Get-VM | Where { $_.State –eq ‘Running’ } | ft Name, AutomaticStartAction -AutoSize
No tips yet.
Be the first to tip!

Like this post? Tip me with bitcoin!


If you enjoyed reading this post, please consider tipping me using Bitcoin. Each post gets its own unique Bitcoin address so by tipping you're not only making my continued efforts possible but telling me what you liked.

VN:F [1.9.22_1171]
Rating: 0.0/6 (0 votes cast)

2 thoughts on “PowerShell: Change Automatic Start Action on Hyper-V VM`s”

  1. Hello. When run the command it doesnt seem to do anything. Ive manually set one of the VMs automaticstartaction to Nothing, but it doesnt change with this script.
    Im running it in Powershell ISE as admin on the HV.

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    1. Hello, Is the VM machines running? becourse the command only returns VMs there is currently running.

      VN:F [1.9.22_1171]
      Rating: 0.0/5 (0 votes cast)

Leave a Reply

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