Hi,
On a Windows 2016 server running PowerShell 5.1, I get the following error when calling Get-VIEvent:
get-vievent : 8/23/2017 5:15:07 PM Get-VIEvent Error in deserializing body of reply message for operation 'RetrieveProperties'.
At line:1 char:1
+ get-vievent
+ ~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-VIEvent], VimException
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetEvent
It works fine on a server running Windows 2012 r2 and PowerShell 5.
Thanks,
Joel
Nope, all too quiet on this front..
Thanks for the update andreaspa. I was told by someone (LucD) on this board that a fix was not far away in a 'future version'. No timescale though. All this talk about 'automation' and I see no way to really make that happen with VMware at the moment. I even wonder if the organisation behind VMware are doing any more that bug fixing for PoweshellCLI and, perhaps, they have an alternative strategy they are investing in. Python perhaps. Who knows?!
Sorry to disagree, but the PowerCLI Dev Team is doing a whole lot more than just bug fixing.
If you look at the PowerCLI Change log, you'll notice that besides the bug fixes, there are quite a bit of new features and improvements.
And you'll also notice that they since last year, upped the pace between successive releases, not an indication for a product they might be abandoning imho.
But like I already replied in another of your threads, if you don't feel that PowerShell/PowerCLI brings what you need, there are other automation frameworks offered by VMware.
Have a look at the available SDKs, perhaps one of those would be a better fit for you.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
facing the same issue with Powercli 6.5 release 1 on windows server 2016
PS 5 / PowerCLI 6.5.4 on Windows 7 Ent, same issue
if I run it without the export all ok.
if I run it against one ESXi only all ok
if I run it as it is below it throws that error
$dcs = Get-Datacenter myDC1,myDC2
$vClusters = Get-Cluster -Location $dcs | ?{$_.Name -notmatch "Maintenance"} | sort
foreach($esx in ($vClusters | Get-VMHost))
{
Get-VIEvent -Entity $esx -MaxSamples ([int]::MaxValue) -Start (Get-Date).AddDays(–6) | ?{$_.FullFormattedMessage -match "All Paths Down"} |
select @{N="ClusterName";E={$esx.Parent}},@{N="ESXname";E={$esx.Name}}, CreatedTime, FullFormattedMessage | Export-Csv 'C:\SANcheck.csv' -NoTypeInformation
}