Hello, I need to create one .bat to open a connection automatically to vCenter, I created a .bat PowerCLI calling and opens well but I did not connect, you copy the contents:
C: \ Windows \ System32 \ WindowsPowerShell \ v1.0 \ powershell.exe-psc "C: \ Program Files (x86) \ VMware \ Infrastructure \ vSphere PowerCLI \ vim.psc1"-noe-c ". \" C: \ Program Files (x86) \ VMware \ Infrastructure \ vSphere PowerCLI \ Scripts \ Initialize-VIToolkitEnvironment.ps1 \ ""
connect-viserver -Server localhost -Protocol https -User administrator -Password password1
When I open PowerCLI and run the line connect-viserver successfully connected but not connected when I run the .bat.
Any ideas? Thanks