powershell save credential password and convertToString
作者:互联网
保存凭据/密码
$username = "admin"
$password = ConvertTo-SecureString "123" -AsPlainText -Force
$psCred = New-Object System.Management.Automation.PSCredential -ArgumentList ($username, $password)
打印保存的密码
$bstr = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($psCred.Password)
System.Runtime.InteropServices.Marshal]::PtrToStringAuto($bstr)
123
u010691082
发布了1 篇原创文章 · 获赞 0 · 访问量 14
私信
关注
标签:username,credential,Runtime,psCred,System,InteropServices,save,password 来源: https://blog.csdn.net/u010691082/article/details/104491611