$Password = Read-Host -Prompt "Enter Password" -AsSecureString
$DecodedPassword = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($Password))
Connect-VIServer -Server vcsa-a.vclass.local -User administrator@vsphere.local -Password $DecodedPassword
$DecodedPassword = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($Password))
Connect-VIServer -Server vcsa-a.vclass.local -User administrator@vsphere.local -Password $DecodedPassword
No comments:
Post a Comment