$Clusters = Get-Cluster -Name Name of the Cluster [This is working fine]
$allNodes = $Clusters | Get-VMHost [This is working fine]
$allVMs = $Clusters | Get-VM [This is not working and getting below error]
Get-VM : 7/9/2020 9:55:42 AM Get-VM Exception has been thrown by the target of an invocation.
At line:1 char:23
+ $allVMs = $Clusters | Get-VM
+ CategoryInfo : NotSpecified: (:) [Get-VM], VimException
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM
PowerCli Version: 6.5 Releae 1 build 4624819
vCenter Version: 6.7.0
Build No: 14792544
Build No: 15018017
Kindly help me.
that sounds like an issue with powercli itself
i wouldn't use the PowerCli Version: 6.5 Releae 1 build 4624819 with higher Vmware Versions.
VMware Product Interoperability Matrices (Version seems not supported)
i have this one in use PowerShell Gallery | VMware.PowerCLI 220.127.116.1147286
i don't have any issue with it. May good you upgrade and see how it goes