Create Secure String from Encrypted password obtained from REST API RRS feed

  • Question

  • I have an username and encrypted available from the API. And I want to use it for other purpose of login. How Can I convert the encrypted password available from API to Secure String. I tried below one but got an error. Someone please help me with this one.

    $Encryptedpassword | ConvertTo-SecureString 

    ConvertTo-SecureString : Input string was not in a correct format.
    At line:1 char:20
    + $pwd = $password | ConvertTo-SecureString -Key $Key
    +                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [ConvertTo-SecureString], FormatException
        + FullyQualifiedErrorId : System.FormatException,Microsoft.PowerShell.Commands.ConvertToSecureStringCommand

    • Moved by Bill_Stewart Monday, September 11, 2017 3:17 PM Unanswerable drive-by question
    Thursday, July 6, 2017 4:31 AM

All replies