PowerCLI one-liner: remove the VMware tools mounted ISO
When you do an “Automatic Tools Upgrade” on a virtual machine the VMware tools iso will be mounted into the VM. Unfortunately it sometimes happens that after the upgrade the iso stays attached and this will result in a warning while doing a manual VMotion.
When you inspect the VM (edit settings) you will see the ISO being mounted.
You can change this to Client Device and the ISO will be unmounted and the warning won’t be shown anymore. Obviously this isn’t something you want to do manually on all your VMs and therefor the following PowerCLI one-liner will help you.
Get-VM | Get-CDDrive | Where { $_.IsoPath } | Set-CDDrive -NoMedia -Confirm:$false
One thought on “PowerCLI one-liner: remove the VMware tools mounted ISO”
very nice, thanks for posting
Comments are closed.