You are here:

WindowsManagement.com > PowerShell > PowerShell 1.0 > ConvertFrom-SecureString
ActiveXperts Network Monitor 2019 proactively manages network servers, devices, databases and more.

ConvertFrom-SecureString - PowerShell 1.0

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.

ConvertFrom-SecureString


Description
Back up your Hyper-V VMs Easy & Fast. 100% built for Hyper-V. Free for 2 VMs, forever.

Usage


Options
-secureString 
        The secure string to convert to an encrypted standard string.
        
   -secureKey 
        The encryption key as a secure string,
        this is converted to a byte array before being used as the key.
        
   -key Byte
        The encryption key as a byte array.
        
   CommonParameters
        The common parameters: -Verbose, -Debug,-ErrorAction, -ErrorVariable, -OutVariable.

Example(s)
Create a secure string by typing at the command prompt.

PS C:\>$securestring = read-host -asSecureString

Convert a secure string stored in a variable to an encrypted standard string. The resulting encrypted standard string can be displayed by typing $standardstring:

$standardstring = convertfrom-securestring $securestring

Convert a secure string using the Rijndael algorithm, the key is an array of 24 digits, all of which are less than 256, (24 * 8 bit bytes = 192 bits)

PS C:\>$key = (3,42,2,3,100,34,254,222,1,1,2,23,42,54,33,233,1,64,2,7,6,5,35,43)
$standardstring = convertfrom-securestring $securestring -key $key