Script to Start a VM?Need a script to start a VM? <hr size="1" align="left" width="25%">Tony Soper© 2009 Microsoft Corporation. All rights reserved.Thu, 30 Oct 2008 19:21:51 Z917b9399-be06-426c-bfd7-8152ea69536chttp://social.technet.microsoft.com/Forums/en-US/ITCG/thread/917b9399-be06-426c-bfd7-8152ea69536c#917b9399-be06-426c-bfd7-8152ea69536chttp://social.technet.microsoft.com/Forums/en-US/ITCG/thread/917b9399-be06-426c-bfd7-8152ea69536c#917b9399-be06-426c-bfd7-8152ea69536ctonysohttp://social.technet.microsoft.com/Profile/en-US/?user=tonysoScript to Start a VM?Need a script to start a VM? <hr size="1" align="left" width="25%">Tony SoperThu, 30 Oct 2008 19:17:29 Z2008-10-30T19:17:29Zhttp://social.technet.microsoft.com/Forums/en-US/ITCG/thread/917b9399-be06-426c-bfd7-8152ea69536c#9add3653-d99c-414d-8c40-deb3c4127207http://social.technet.microsoft.com/Forums/en-US/ITCG/thread/917b9399-be06-426c-bfd7-8152ea69536c#9add3653-d99c-414d-8c40-deb3c4127207tonysoperhttp://social.technet.microsoft.com/Profile/en-US/?user=tonysoperScript to Start a VM?John Kelbley has provided one. Leave feedback here or you can e-mail <a href="mailto:johnkel@microsoft.com/">johnkel@microsoft.com/</a>  <p>strComputer = &quot;.&quot; <br>Set objWMIService = GetObject(&quot;winmgmts:\\&quot; &amp; strComputer &amp; &quot;\root\virtualization&quot;) <br>' Obtain an instance of the the class <br>' using a key property value.</p> <p><br>&quot;select * from Msvm_ComputerSystem where elementname =&quot;  +&quot;'&quot; + $virtualguest + &quot;'&quot;</p> <p><br>Set objShare = objWMIService.Get(&quot;Msvm_ComputerSystem.CreationClassName='Msvm_ComputerSystem', ElementName='CCS V1 Head'&quot;)<br>Set objInParam = objShare.Methods_(&quot;RequestStateChange&quot;).inParameters.SpawnInstance_()<br>objInParam.Properties_.Item(&quot;RequestedState&quot;) =  2<br>Set objOutParams = objWMIService.ExecMethod(&quot;Msvm_ComputerSystem.CreationClassName='Msvm_ComputerSystem', ElementName='CCS V1 Head'&quot;, &quot;RequestStateChange&quot;, objInParam)<br></p><hr size="1" align="left" width="25%">tony soperThu, 30 Oct 2008 19:21:36 Z2008-10-30T19:21:36Z