Invoke-ServiceFabricDecryptText
Decrypts the text encrypted by the Invoke-ServiceFabricEncryptText cmdlet.
Syntax
Invoke-ServiceFabricDecryptText
[-CipherText] <String>
[-StoreLocation <StoreLocation>]
[-TimeoutSec <Int32>]
[<CommonParameters>]
Description
The Invoke-ServiceFabricDecryptText cmdlet decrypts text that was encrypted by using the Invoke-ServiceFabricEncryptText cmdlet for verification in Service Fabric.
Before you perform any operation on a Service Fabric cluster, establish a connection to the cluster by using the Connect-ServiceFabricCluster cmdlet.
Note
In order to decrypt the text, the caller of this cmdlet should have access to the private key of the certificate used to encrypt the text.
Examples
Example 1: Decrypt text
PS C:\windows\system32> $EncryptedText = Invoke-ServiceFabricEncryptText -Text "hello world" -CertThumbprint $Thumbprint
-CertStore -StoreLocation LocalMachine -StoreName My
PS C:\windows\system32> Invoke-ServiceFabricDecryptText -CipherText $EncryptedText -StoreLocation "LocalMachine"
hello world
The first command encrypts text using the Invoke-ServiceFabricEncryptText cmdlet and stores the result in the variable named $EncryptedText.
The second command decrypts the text stored in the $EncryptedText variable and saves it to the store location named LocalMachine.
Parameters
-CipherText
Specifies the cipher text for the cmdlet.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-StoreLocation
Specifies the location of a certificate store. Valid values are:
- CurrentUser
- LocalMachine
Type: | StoreLocation |
Accepted values: | CurrentUser, LocalMachine |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TimeoutSec
Specifies the time-out period, in seconds, for the operation.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
System.String
Outputs
System.Object