Hyper-V Program Manager
To get things started here, I thought I would put up some samples for the most basic scripts I could think of for interacting with Windows Virtual PC. So here is a sample script that just lists the virtual machines that are currently registered on the local system:
# Connect to Virtual PC
$vpc=new-object –com VirtualPC.Application –Strict
write-host "Virtual Machines:"
# Iterate over the virtual machines and display their names
foreach ($vm in $vpc.VirtualMachines)
'Connect to Virtual PC
Set vpc = CreateObject("VirtualPC.Application")
'Get collection of virtual machines
set vms = vpc.VirtualMachines
Wscript.Echo "Virtual Machines:"
'Iterate over the virtual machines and display their names
For Each vm in vms
I am running Win7 RC. I have VPC 6.0 installed. I get an error doing the New-Object
PS C:\> $vpc=new-object -com VirtualPC.Application -Strict
New-Object : Cannot load COM type VirtualPC.Application.
At line:1 char:16
+ $vpc=new-object <<<< -com VirtualPC.Application -Strict
+ CategoryInfo : InvalidType: (:) [New-Object], PSArgumentException
+ FullyQualifiedErrorId : CannotLoadComObjectType,Microsoft.PowerShell.Commands.NewObjectCommand
Are you using Virtual PC 2007, or Windows Virtual PC?
Is there something similar to enumerate the machines for VirtualPC 2007?
No, Virtual PC 2007 has no scriptable interface.