The Get-View cmdlet gives an error on a HardDiskImpl object.
$hdImpl = Get-HardDisk -VM (Get-VM -Name <VM-name>) $hd = Get-View $hdImpl.ID
The message you get is
Get-View : The request refers to an object that no longer exists or has never existed.
This is perhaps caused by the "special" layout of the ID field in the HardDiskImpl object.
Example: VirtualMachine-vm-52/2000
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
The way I understand it, this is because HardDiskImpl is a data object , not a managed object.
: http://www.vmware.com/support/developer/vc-sdk/visdk25pubs/ReferenceGuide/do-types-landing.html
I'm not 100% sure of this and I don't know about workarounds.
Hal Rottenberg
Co-Host, PowerScripting Podcast (http://powerscripting.net)
Correct. There are no workarounds.