I'm getting an error when trying to use PowerCLI Get-View. It's really holding us back as this is a useful cmdlet!
$vms = Get-VM | Get-View
The above gives the error: Get-View Error in deserializing body of reply message for operation 'RetrieveProperties'.
I've seen the same error reported in forums but haven't seen a solution. Seems to have appeared with PowerCLI 6.5, which is what we have installed.
Thanks in advance.
LucD, I should have asked before... when you say 'fixed in a future release', do you mean release of PowerCLI? I guess you mean that. Also, are there any minimum version requirements for vCenter? We're on 6.0 Update 1.
I already asked you in another post about what is the best bet in terms of a language to standardise on for automation of VMWware admin. Honestly speaking, I'm not that impressed with Powershell in general and, as we can see, PowerCLI has quite a few holes. Where is the organisation behind VMware putting most of its investment at the moment? Python API/Library approach? Or still backing the PowerCLI approach? Something else?
First, I'm not working for VMware, so I have no view nor knowledge on their timelines, roadmaps and investments.
Consult the compatibility matrix to see which PowerCLI versions are supported.
In your case that gives
Sorry to hear that you are not impressed with with PowerShell and PowerCLI.
VMware is producing multiple frameworks to interface with their products, and PowerCLI is one of them.
And I don't think they are abandoning PowerCLI anytime soon.
Fyi, there is a rather impressive Dev Team behind PowerCLI, in fact since a year they are producing updates on a shorter interval than the 6-monthly cycle we used to have before.
What version of PowerCLI are you currently using? The current release is PowerCLI 6.5.4.
If you're unsure, please reference the following blog: https://blogs.vmware.com/PowerCLI/2017/08/finding-powercli-version.html
VMware always recommends being on the latest and greatest version of PowerCLI. If you're not at that version, I would start by upgrading.
If you're still experiencing the issue, I would suggest creating a support request. The process can be found in the following blog: https://blogs.vmware.com/PowerCLI/2017/08/powercli-support-breakdown.html
Concerning your other post, the choice is yours as to what language to standardize on. PowerCLI isn't going anywhere and continues to be developed and expanded on. If PowerCLI isn't your choice, for vSphere 6.0, there are VMware SDKs for Perl, .Net, and Java as well as open sourced SDKs for Python, Ruby, and Go. When you upgrade to vSphere 6.5, there are new RESTful APIs that can be consumed which have a separate set of SDKs to use.
I have seen a recent occurrence of this deserialization error when running Get-View with PowerCLi 10.2.
It was eventually identified as being caused by some VMs in the inventory which had >32 snapshots (caused by problems with a backup not removing snapshots). Once the snapshots were removed from those VMs the command completed successfully. So I would suggest it may be worth checking for any VM view parameters which may be returning unexpected or out of supported limit results.