例如,将“A123456”转化为Securestring PS C:\WINDOWS\system32>$seString = ConvertTo-SecureString -String "A123456" -AsPlainText -Force PS C:\WINDOWS\system32>$seStr System.Security.SecureString 1. 2. 3.
Once the cmdlet gets the string you’ve entered, it will pipe the output to ConvertFrom-SecureString. If you run just those two parts read-host -AsSecureString | ConvertFrom-SecureString you will get output similar to the following: ConvertFrom-SecureString does the opposite of what ConvertTo-Sec...
ConvertTo-SecureString [-String] <String> [[-SecureKey] <SecureString>] [<CommonParameters>]PowerShell 复制 ConvertTo-SecureString [-String] <String> [-AsPlainText] [-Force] [<CommonParameters>]PowerShell 复制 ConvertTo-SecureString [-String] <String> [-Key <Byte[]>] [<CommonParam...
ConvertTo-SecureString [-String] <String> [[-SecureKey] <SecureString>] [<CommonParameters>]PowerShell 複製 ConvertTo-SecureString [-String] <String> [-AsPlainText] [-Force] [<CommonParameters>]PowerShell 複製 ConvertTo-SecureString [-String] <String> [-Key <Byte[]>] [<CommonParameters>...
以下是如何提示输入SecureString并将其作为加密的标准字符串写入文本文件:
$pwd_secure_string=Read-Host"Enter a Password"-AsSecureString 示例3:遮蔽输入并将其存储为纯文本字符串 此示例显示字符串“Enter a Password:”作为提示。 当输入某个值时,控制台中将显示星号 (*) 而非该输入。 按 Enter 键时,该值将作为 String 对象存储在$pwd_string变量中。
ConvertTo-SecureString [-String] <String> [[-SecureKey] <SecureString>] [<CommonParameters>]PowerShell Copy ConvertTo-SecureString [-String] <String> [-AsPlainText] [-Force] [<CommonParameters>]PowerShell Copy ConvertTo-SecureString [-String] <String> [-Key <Byte[]>] [<CommonParameters>...
ConvertTo-SecureString [-String] <String> [[-SecureKey] <SecureString>] [<CommonParameters>]PowerShell Copy ConvertTo-SecureString [-String] <String> [-AsPlainText] [-Force] [<CommonParameters>]PowerShell Copy ConvertTo-SecureString [-String] <String> [-Key <Byte[]>] [<CommonParameters>...
ConvertTo-SecureString[-String] <String> [-AsPlainText] [-Force] [<CommonParameters>] powershell ConvertTo-SecureString[-String] <String> [-Key <Byte[]>] [<CommonParameters>] 说明 ConvertTo-SecureStringcmdlet 会将加密的标准字符串转换为安全字符串。 它还可以将纯文本转换为安全字符串。 它与Conve...
On the Windows operating system, to include the local computer in the value of theComputerNameparameter, you must start PowerShell with the Run as administrator option. Type:String Aliases:Cn Position:0 Default value:None Required:True Accept pipeline input:True ...