PowerTip: Change the Startup Action on Virtual Machine with PowerShell

PowerTip: Change the Startup Action on Virtual Machine with PowerShell

  • Comments 1
  • Likes

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

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Would have been more thorough if you mentioned: –AutomaticStartAction StartIfRunning