how do I change all my vms from isopath to client device?
To do this in Powershell this is probably the cmdlet you're after:
http://www.vmware.com/support/developer/PowerCLI/PowerCLI41/html/Set-CDDrive.html
It sounds as though Set-CDDrive -HostDevice is what you're after. You should be able to find out the HostDevice string by using Get-CDDrive -VM name. You'll need to run this separately though as Set-CDDrive -HostDevice doesn't take piped commands I don't think.
I've not tested this but something like...
ForEach-Object ($VM in Get-VM){
$Drive = Get-CDDrive -VM $VM
Set-CDDrive -CD $Drive
}
Hope this helps.
I'm afraid that is a feature of the vSphere Client, there is no cmdlet nor API to set the CD to the client device.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hello, tdubb123-
I think that you are saying that you want to set the CDDrive to "Client Device" in the "Device Type" section of th settings of a VM in the vSphere client (effectively, disconnecting the CDDrive from anything). If so, you can do that Set-CDDrive -- you almost had it. Like:
Get-VM | Get-CDDrive | ?{$_.ConnectionState.Connected -and ($_.ISOPath -like "*.ISO*")} | Set-CDDrive -NoMedia -Confirm:$false
Like LucD said, though, if you are wanting to connect the CDDrives to a device on your client (an ISO local to your workstation, for example), there is no PowerCLI/API way to do so.
Message was edited by mattboren -- had left off the portion to check that the ISOPath was like the given string. Updated.
Sorry - I missread the original post as host device, not client device.