October 18th, 2013

PowerTip: Change the Startup Action on Virtual Machine with PowerShell

Doctor Scripto
Scripter

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

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.

Feedback