Quantcast
Channel: VMware Communities : Document List - vSphere PowerCLI
Viewing all articles
Browse latest Browse all 379

create a. bat file to connect to vCenter

$
0
0

 

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

 

 


Viewing all articles
Browse latest Browse all 379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>