Folks,
I have an Ansible server and a Windows PowerShell server with PowerCli.
I encapsulate PowerCli commands within PowerShell scripts and call them in Ansible.
It works on one Windows server and doesn't on another.
Getting error as below
"Connect-VIServer Exception \r\nof type 'System.OutOfMemoryException' was thrown.
NotSpecified: (:) [Connect-VIServer], ViError\r\n+ FullyQualifiedErrorId : Client20_ConnectivityServiceImpl_Reconnect_Excep \r\ntion,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer\r\n\r\nGet-Datacenter : Get-Datacenter
You are not \r\ncurrently connected to any servers. Please connect first using a Connect \r\ncmdlet"
Is there any requirements that I need to follow?
I'm able to run normal powershell scripts via ansible on both windows servers and am able to run powercli commands within the windows servers.
Kindly suggest.
Regards,
Rajesh