Hi All,
I know that we can connect to any vmware server using Connect-VIServer cmdlet in our script by providing all credentials of server but I want to pass it through command line.
I am able to connect the server by hardcoded login information in the script using Connect-VIServer cmdlet but I want that server will collect all necessary login information from command line and assign it which are required for Connect-VIServer to connect the server.
For example, I am having test1.ps1 script and when I will execute the script with arguments,it should be taken by Connect-VIServer cmdlet to connect the server written in the script.
[vSphere PowerCLI] C:\Scripts> C:\Scripts\test1.ps1 Server_IP_Address User_Name Password
I appreciate the effort in advance :smileyhappy:
Thanks!