vmware / PowerCLI-Example-Scripts

http://blogs.vmware.com/powercli
Other
746 stars 603 forks source link

Connect-SsoAdminServer -Credential parameter #493

Closed et1975 closed 2 years ago

et1975 commented 2 years ago

It would be good if Connect-SsoAdminServer supported -Credential in addition to username/password, this would also match Connect-VIServer.

dmilov commented 2 years ago

Fixed in version 1.3.6. The new version is available on PSGallery

PS C:\Users\dmilov> $credential = Get-Credential -UserName administrator@vsphere.local

PowerShell credential request
Enter your credentials.
Password for user administrator@vsphere.local: ********

PS C:\Users\dmilov> Connect-SsoAdminServer -SkipCertificateCheck -Server 10.23.82.130 -Credential $credential

Name        : 10.23.82.130
ServiceUri  : https://10.23.82.130/sso-adminserver/sdk/vsphere.local
User        : administrator@vsphere.local
Id          : /SsoAdminServer=vsphere.local/administrator@10.23.82.130
IsConnected : True
Client      : VMware.vSphere.SsoAdminClient.SsoAdminClient
RefCount    : 1