$vmHost = Get-VMHost -Name $server
Get-ScsiLun -vmHost $vmHost -LunType "disk"
Returns the error: Object reference not set to an instance of an object.
This is rather frustrating as $vmhost is an object and the exact same command works for a colleague at another institution.
I'm using powerCLI version 4.0 U1 build 208462 and windows 7. Any advice would be greatly appreciated.
I know there were some changes to the cmdlets in PowerCLI 4.0u1, you might want to pose your question in the PowerCLI forums, there are some gurus there that can definitely give you the answer and the reason why, I'm sure it's a small syntax that you're missing.
=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at:
VMware Code Central - Scripts/Sample code for Developers and Administrators
If you find this information useful, please award points for "correct" or "helpful".
Did you find a resolution to this? I'm having the same problem against our VCenter and our older VirtualCenter VC's.
Thanks,
Upgrading to the latest powercli fixed this issue for me.
I'm using powerCLI version 4.0 U1 build 208462 is that not the latest version?
From vmware downloads:
"Latest Released Version: 4.0.1 | 11/19/09 | 208462"