ConvertTo-SecureString参考 反馈 模块: Microsoft.PowerShell.Security 将纯文本或加密字符串转换为安全字符串。语法PowerShell 复制 ConvertTo-SecureString [-String] <String> [[-SecureKey] <SecureString>] [<CommonParameters>]PowerShell 复制 ConvertTo-SecureString [-String] <String> [-AsPlainText]...
ConvertTo-SecureString [-String] <String> [[-SecureKey] <SecureString>] [<CommonParameters>]PowerShell 複製 ConvertTo-SecureString [-String] <String> [-AsPlainText] [-Force] [<CommonParameters>]PowerShell 複製 ConvertTo-SecureString [-String] <String> [-Key <Byte[]>] [<CommonParameters>...
以下是如何提示输入SecureString并将其作为加密的标准字符串写入文本文件:
It can also convert plain text to secure strings. Normally this cmdlet expects an encrypted string, which is not what you are passing to it, but it can be forced to take a plaintext string and convert it to a secure string. That’s what happens in the above script. You’re now a ...
ConvertTo-SecureString[-String] <String> [[-SecureKey] <SecureString>] [<CommonParameters>] PowerShell ConvertTo-SecureString[-String] <String> [-AsPlainText] [-Force] [<CommonParameters>] PowerShell ConvertTo-SecureString[-String] <String> [-Key <Byte[]>] [<CommonParameters>] ...
ConvertFrom-SecureStringcmdlet 可将安全字符串 (System.Security.SecureString) 转换为加密的标准字符串 (System.String)。和安全字符串不同,加密的标准字符串可保存在文件中以供以后使用。 加密的标准字符串可转换回它的安全字符串格式,方法是使用ConvertTo-SecureStringcmdlet。
ConvertTo-SecureString [[-SecureKey] <SecureString>] [-String] <string> [<CommonParameters>] 说明 ConvertTo-SecureString cmdlet 将加密的标准字符串转换为安全字符串。它还可以将纯文本转换为安全字符串。此 Cmdlet 与 ConvertFrom-SecureString 和 Read-Host 一起使用。该 cmdlet 创建的安全字符串可以与需要类...
ConvertFrom-SecureStringcmdlet 可将安全字符串 (System.Security.SecureString) 转换为加密的标准字符串 (System.String)。和安全字符串不同,加密的标准字符串可保存在文件中以供以后使用。 加密的标准字符串可转换回它的安全字符串格式,方法是使用ConvertTo-SecureStringcmdlet。
The first command assigns the username to the$Uservariable. Ensure the value follows the "Domain\User" or "ComputerName\User" format. The second command uses theRead-Hostcmdlet to create a secure string from user input. ThePromptparameter requests user input, and theAsSecureStringparameter masks...
SecureKey Provides access to the SecureKey parameter. String Provides access to the String parameter. SupportsCustomRemoting Declares whether this command supports its own custom remoting. Commands that support their own custom remoting should return TRUE from this property, and use ...