#讀入所輸入的字串並儲存為SecureString
PS C:\> $mySecureString = Read-Host -AsSecureString
****************

#取回SecureString的值
PS C:\> [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.Int
eropServices.Marshal
]::SecureStringToBSTR($mySecureString))
this is a secret

arrow
arrow
    全站熱搜

    ayowu 發表在 痞客邦 留言(0) 人氣()