PowerTip: Change the Startup Action on Virtual Machine with PowerShell

Summary: Change the startup action on virtual machines by using Windows PowerShell.

Hey, Scripting Guy! Question How can I use Windows PowerShell to fix the startup state for a virtual machine that isn’t starting automatically?

Hey, Scripting Guy! Answer Use the Set-VM cmdlet to easily adjust the settings.

To automatically start a virtual machine every time:

SET-VM –name CONTOSOVM1 –AutomaticStartAction Start

To ensure that a virtual machine does NOT start automatically:

SET-VM –name CONTOSOVM1 –AutomaticStartAction Nothing

Comments (1)

  1. Robert says:

    Would have been more thorough if you mentioned: –AutomaticStartAction StartIfRunning

Skip to main content