VMware Cloud Community
muneerhk
Contributor
Contributor

PowerCli getting error

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

Tags (2)
Reply
0 Kudos
2 Replies
Madmax01
Expert
Expert

Hello,

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 12.0.0.15947286

i don't have any issue with it.   May good you upgrade and see how it goes Smiley Wink

Best regards

Max

Reply
0 Kudos
scott28tt
VMware Employee
VMware Employee

Moderator: Thread moved to the PowerCLI area.


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
Reply
0 Kudos