Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 2.0 » ConvertTo-SecureString

ConvertTo-SecureString - Powershell 2.0 CmdLet

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.

ConvertTo-SecureString


Short description
Converts encrypted standard strings to secure strings. It can also convert plain text to secure strings. It is used

Syntax
ConvertTo-SecureString [-Key <Byte[]>] [-String] <string> [<CommonParameters>]
    
    ConvertTo-SecureString [[-AsPlainText]] [[-Force]] [-String] <string> [<CommonParameters>]
    
    ConvertTo-SecureString [[-SecureKey] <SecureString>] [-String] <string> [<CommonParameters>]

Description
The ConvertTo-SecureString cmdlet converts encrypted standard strings into secure strings. It can also convert plai
    n text to secure strings. It is used with ConvertFrom-SecureString and Read-Host. The secure string created by the 
    cmdlet can be used with cmdlets or functions that require a parameter of type SecureString. The secure string can b
    e converted back to an encrypted, standard string using the ConvertFrom-SecureString cmdlet. This enables it to be 
    stored in a file for later use.
    
    If the standard string being converted was encrypted with ConvertFrom-SecureString using a specified key, that same
     key must be provided as the value of the Key or SecureKey parameter of the ConvertTo-SecureString cmdlet.