Invoke-ServiceFabricDecryptText
Decrypts the text encrypted by the Invoke-ServiceFabricEncryptText cmdlet.
Syntax
Default (Default)
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.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 0 |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-StoreLocation
Specifies the location of a certificate store. Valid values are:
- CurrentUser
- LocalMachine
Parameter properties
Type: | StoreLocation |
Default value: | None |
Accepted values: | CurrentUser, LocalMachine |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-TimeoutSec
Specifies the time-out period, in seconds, for the operation.
Parameter properties
Type: | Int32 |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.