I have 4 vCenters. The first 3 are all Windows vCenter installations. I am able to connect to them via scripts with this method.
Connect-VIServer IP/DNS_Name -User administrator@vsphere.local -Password P@ssw0rd -Force
The 4th vCenter instance is a VCSA deployment and it will not accept this method in a script. I've also tried the credential store method.
Two of the Windows vCenter instances are behind firewalls as is the VCSA instance I'm having issues with. I've worked with our Cisco guru to insure that communication is not the issue.
I can consistently pass the above command manually via the cli and it connects to the VCSA every time, but when ran via a script, it consistently fails to connect to the VCSA.
VCSA Version
----------------
6.0.0 Update 3b build 5318203
PowerCLI Version
----------------
VMware PowerCLI 6.5 Release 1 build 4624819
---------------
Component Versions
---------------
VMware Cis Core PowerCLI Component 6.5 build 4624453
VMware VimAutomation Core PowerCLI Component 6.5 build 4624450
VMWare ImageBuilder PowerCLI Component 6.5 build 4561891
VMWare AutoDeploy PowerCLI Component 6.5 build 4561891
VMware Vds PowerCLI Component 6.5 build 4624695
VMware Cloud PowerCLI Component 6.5 build 4624821
VMware HA PowerCLI Component 6.0 build 4525225
VMware HorizonView PowerCLI Component 7.0.2 build 4596620
VMware Licensing PowerCLI Component 6.5 build 4624822
VMware PCloud PowerCLI Component 6.5 build 4624825
VMware Storage PowerCLI Component 6.5 build 4624820
VMware vROps PowerCLI Component 6.5 build 4624824
VMware vSphere Update Manager PowerCLI 6.5 build 4540462