Hello, I'm experiencing a weird problem when running basically anything in PowerCLI. Any script I run I get:
get-vm : 1/23/2018 10:37:07 PM Get-VM Server esxHost is not connected.
At C:\listVMsWithSharedVirtualDisk.ps1:16 char:30
+ $row.ESXiHost = (get-vm $vm.Name).VMHost
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-VM], ViServerConnectionException
+ FullyQualifiedErrorId : Client20_ConnectivityServiceImpl_TryVerifyIsConnected_NotConnected,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM
The host has no VMs on top and it was disconnected few days ago but now is back online since many hours. I closed the powercli session and opened it again but nothing. For any line of the script regardless of what it is it throws that error. Has anybody got that? I googled but nothing... The host is manageable, reachable via vCenter server, via ssh .. and even via PowerCLI. Scripts in hte end produce their results but it's annoying to have this thrown to the screen after every line...
PS 5/PowerCLI 6.5.4
thanks Luc, all was fine outside my workstation. It was annoying to have to shutdown the whole Pc to have that alert disappear..sorry for wasting time. Weird however.. never happened before, I'm not a PowerCLI expert but I use PowerCLI scripts since few years now
Are you conecting to a vCenter or to that specific ESXi node?
Or both?
Does the ConnectionState property change on that ESXI node?
You can check in a loop.
Anything in the Task and Events?
In the vpxd logs?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
thanks Luc, all was fine outside my workstation. It was annoying to have to shutdown the whole Pc to have that alert disappear..sorry for wasting time. Weird however.. never happened before, I'm not a PowerCLI expert but I use PowerCLI scripts since few years now
No problem, it happens occasionally that only a full restart of the PC fixes the issue.
Had that as well :smileygrin:
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference