Reply to Message

View discussion in a popup

Replying to:
LucD
Leadership
Leadership

Yes, you can create a PSCredential object that you can pass on the Credential parameter

$username = "account"
$pswd = "password"
$pswdSecure = ConvertTo-SecureString -String $pswd -AsPlainText -Force
$cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $username,$pswdSecure


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos