Command
$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
ESXi: 6.7.0
Build No: 15018017
Kindly help me.
Thanks