Haha - well Conrad says he's just gonna tell me to shut up!!! Image may be NSFW.
Clik here to view.
Thanks for the help...
So the following is the code that Onyx generated
# ------- ReconfigVM_Task -------
$spec = New-Object VMware.Vim.VirtualMachineConfigSpec
$spec.changeVersion = "2013-05-02T20:01:06.056633Z"
$spec.deviceChange = New-Object VMware.Vim.VirtualDeviceConfigSpec[] (1)
$spec.deviceChange[0] = New-Object VMware.Vim.VirtualDeviceConfigSpec
$spec.deviceChange[0].operation = "add"
$spec.deviceChange[0].device = New-Object VMware.Vim.VirtualUSB
$spec.deviceChange[0].device.key = -100
$spec.deviceChange[0].device.backing = New-Object VMware.Vim.VirtualUSBUSBBackingInfo
$spec.deviceChange[0].device.backing.deviceName = "path:2/0/7 version:2"
$spec.deviceChange[0].device.connectable = New-Object VMware.Vim.VirtualDeviceConnectInfo
$spec.deviceChange[0].device.connectable.startConnected = $true
$spec.deviceChange[0].device.connectable.allowGuestControl = $false
$spec.deviceChange[0].device.connectable.connected = $true
$spec.deviceChange[0].device.connected = $false
$_this = Get-View -Id 'VirtualMachine-vm-208370'
$_this.ReconfigVM_Task($spec)
Let's just say my PID is 111 and my VID is 222 - I have the real ones, just can't find where I stored them right now Image may be NSFW.
Clik here to view. Where would I go about adding these autoconnectpatterns in this code? I asume I need to remove the device.backing.deviceName line? Also, is hostID the same as moref? and how does that play in?
Thanks for your help Luc Image may be NSFW.
Clik here to view.
Mike