All,
I am using some code I found on the web to reset a VM on Hyper-V.
VBScript:
Set sService = GetObject("winmgmts:\\.\root\virtualization")
FWH:
oWinMgmt := CreateObject("winmgmts:\\.\root\virtualization")
oWinMgmt := GetActiveObject("winmgmts:\\.\root\virtualization")
oWinMgmt := Win_OleGetActiveObject("winmgmts:\\.\root\virtualization")
Also tried (based on a post from 2007):
oWinMgmt := CreateObject("winmgmts:")
Everything I have tried:
Valtype( oWinMgmt ) == "U"
I am running this on the Server that hosts the VM systems.
I can run a powershell command and get this accomplished:
Reset-VM -Name "Windows 10_04_New" -Force
Anyone familiar with this?
Thanks,
Byron ...