< Back
Decrypt-String
Post
NAME Decrypt-String
SYNOPSIS
Decrypt a string.
SYNTAX
Decrypt-String [-CertificateThumbprint] <String> [-EncryptedString] <String> [[-CertificateStore] <String>]
[<CommonParameters>]
DESCRIPTION
Decrypt a string using a certificate.
PARAMETERS
-CertificateThumbprint <String>
The thumbprint of the certificate to use.
Required? true
Position? 0
Default value
Accept pipeline input? false
Accept wildcard characters? false
-EncryptedString <String>
The encrypted string.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-CertificateStore <String>
The store of the certificate.
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
System.String
NOTES
-------------------------- Example 1 --------------------------
PS C:\\> $encrypted
X8t3J+rDKR7emwn64svbxEp5y/XXSHDQsykugcQDtFAZDQ/4EKC9Z7FS02W3RvwIVsxEk1bVLwzBjDJ3JDy3b0PzaX2X6bi3iFrao5bYUg7cMN5xeCJ
oozgrj2ZU4orYA/LFpfAyYSCdzvKF3MYXbu3LWmQkUaMkzsonUsGHw6MX+SqH5uGtts2/uY2I9iJ2GLQSNLOKWdwBbiUH+LYyiAWLELD6O1rfwudw9g
RjH3zl61SbN5oYS/TvBJlCWCYISOdCR66TjQ6nYYp6BhyUBH3J1wb/059B6i5hMvP8XM9WazZH/0h3uB/RLxOQXnN0zPx6QXc4T274Hp724wXfh5DX2
zgOZizopYY2ujKElg0XItaJfxi9L00TPW6ZL4+JVZhfTRUV2+16hAE58eGJ8pchUSm/ZgQFsUx0+vWCz/uy4cNxz5CIDn3ORVyHJ8IWlYH5bTUHU4sd
0I+gbkdEs7bxOytMwM5rF8LQMdDx8frr2mOIsqxwR1RAp2eMWXpA+Dh22N8fGioKLFPN0F8HzPlEtbTrLRc6UawwRSfP6wRQqXWR8FMBOUYXFA24gUQ
XpLoxCMULMQ0m3A/bBkAcB3Mxr9BhFknVfsa10CaxQdgPBc1brTOOXflm+HKw9waftHgbDKFNMIqx66cYRzwsnJIJ0yP0rCVIJ3Jq7tDVd14=
PS C:\\> $decrypted = Decrypt-String -CertificateThumbprint "877D9E1EC875B2E7BF8C53151099758FBD9825C3"
-EncryptedString $encrypted -CertificateStore CurrentUser
PS C:\\> $decrypted
MyPassword
RELATED LINKS
SYNOPSIS
Decrypt a string.
SYNTAX
Decrypt-String [-CertificateThumbprint] <String> [-EncryptedString] <String> [[-CertificateStore] <String>]
[<CommonParameters>]
DESCRIPTION
Decrypt a string using a certificate.
PARAMETERS
-CertificateThumbprint <String>
The thumbprint of the certificate to use.
Required? true
Position? 0
Default value
Accept pipeline input? false
Accept wildcard characters? false
-EncryptedString <String>
The encrypted string.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-CertificateStore <String>
The store of the certificate.
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
System.String
NOTES
-------------------------- Example 1 --------------------------
PS C:\\> $encrypted
X8t3J+rDKR7emwn64svbxEp5y/XXSHDQsykugcQDtFAZDQ/4EKC9Z7FS02W3RvwIVsxEk1bVLwzBjDJ3JDy3b0PzaX2X6bi3iFrao5bYUg7cMN5xeCJ
oozgrj2ZU4orYA/LFpfAyYSCdzvKF3MYXbu3LWmQkUaMkzsonUsGHw6MX+SqH5uGtts2/uY2I9iJ2GLQSNLOKWdwBbiUH+LYyiAWLELD6O1rfwudw9g
RjH3zl61SbN5oYS/TvBJlCWCYISOdCR66TjQ6nYYp6BhyUBH3J1wb/059B6i5hMvP8XM9WazZH/0h3uB/RLxOQXnN0zPx6QXc4T274Hp724wXfh5DX2
zgOZizopYY2ujKElg0XItaJfxi9L00TPW6ZL4+JVZhfTRUV2+16hAE58eGJ8pchUSm/ZgQFsUx0+vWCz/uy4cNxz5CIDn3ORVyHJ8IWlYH5bTUHU4sd
0I+gbkdEs7bxOytMwM5rF8LQMdDx8frr2mOIsqxwR1RAp2eMWXpA+Dh22N8fGioKLFPN0F8HzPlEtbTrLRc6UawwRSfP6wRQqXWR8FMBOUYXFA24gUQ
XpLoxCMULMQ0m3A/bBkAcB3Mxr9BhFknVfsa10CaxQdgPBc1brTOOXflm+HKw9waftHgbDKFNMIqx66cYRzwsnJIJ0yP0rCVIJ3Jq7tDVd14=
PS C:\\> $decrypted = Decrypt-String -CertificateThumbprint "877D9E1EC875B2E7BF8C53151099758FBD9825C3"
-EncryptedString $encrypted -CertificateStore CurrentUser
PS C:\\> $decrypted
MyPassword
RELATED LINKS