#讀入所輸入的字串並儲存為SecureString
PS C:\> $mySecureString = Read-Host -AsSecureString
****************
#取回SecureString的值
PS C:\> [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.Int
eropServices.Marshal]::SecureStringToBSTR($mySecureString))
this is a secret
全站熱搜
留言列表