This is a mirror of official site: http://jasper-net.blogspot.com/

Script to attach a USB device to a virtual machine [VPC]

| Wednesday, January 19, 2011
A couple of people have asked me how to automate attaching a USB device to a Windows Virtual PC virtual machine, so here is a PowerShell script to do just that:

# Connect to Virtual PC
$vpc = new-object -com VirtualPC.Application

# Get VM name
$vmName = Read-host "Specify the name of the virtual machine that you want to use"

# List available USB devices
write-host "The following USB devices are available:"
$vpc.USBDeviceCollection | select -ExpandProperty DeviceString

# Get the USB device name
$usb = Read-host "Enter the name of the USB device that you want to connect to the virtual machine"

Read more: Virtual PC Guy's Blog

Posted via email from Jasper-net

0 comments: