$VSMgtSvc=Get-WmiObject -ComputerName localhost
-NameSpace "rootvirtualization"
-Class "MsVM_virtualSystemManagementService"
get-wmiobject -computername localhost -Namespace rootVirtualization
-query "Select * from MSVM_Computersystem where Description like
'%Virtual%' " | foreach-object {$VSMgtSvc.psbase.invokeMethod
("CreateVirtualSystemSnapshot",@($_,$Null,$null)) }