Import-RDMX509Certificate

Synopsis

Imports an X509 certificate.

Syntax

__AllParameterSets

Import-RDMX509Certificate [-Path] <string> [[-Password] <string>] [[-PrivateKeyPath] <string>]
 -InputObject <PSConnection> [-VaultMode <VaultMode>] [-ForcePromptAnswer <DialogResult[]>]
 [-WhatIf] [-Confirm] [<CommonParameters>]

Description

Imports an X509 certificate. Takes as required parameters the certificate entry to be overwritten and the path to the new certificate file. If the new certificate is of .pfx format, the command additionnally requires the certificate's password. If the new certificate is of .pem or .der format, the command additionnally requires the path to the certificate's private key file. User requires add or edit rights.

Examples

Example 1

PS C:\> Get-RDMEntry -IncludeDocumentsStoredInDatabase -IncludeLocalPlaylists -IncludeUserSpecificSettings -Name MyOtherCert | 
    Import-RDMX509Certificate C:\Users\myuser\Downloads\certtest.pfx 12345

Import a .pfx certificate from the provided path, using its required password (12345), and updating the X509 certificate entry 'MyOtherCert' with its values.

Example 2

PS C:\> $CertToOverwrite = Get-RDMEntry -IncludeDocumentsStoredInDatabase -IncludeLocalPlaylists -IncludeUserSpecificSettings -Name MyOtherCert;
    Import-RDMX509Certificate C:\Users\myuser\Downloads\PemFile.pem -PrivateKeyPath C:\Users\myuser\Downloads\PemKeyFile.key -InputObject $CertToOverwrite

Import a .pem certificate from the provided path, using its required private key path, and updating the X509 certificate entry 'MyOtherCert' with its values.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases:
- cf
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-ForcePromptAnswer

Switch to use with caution. It will automatically answer prompt asking yes/no, yes/no/cancel, or ok/cancel questions. In case of multiple prompts, multiple values can be passed to this parameter. Here are the accepted values:

  • Yes: Accept the prompt. Cover the OK and Automatic value.

  • No: Refuse the yes/no/cancel prompt. Cancel is the fallback option if there is not an option No.

  • Cancel: Cancel the yes/no/cancel prompt. No is the fallback option if there is not an option Cancel.

Type: System.Windows.Forms.DialogResult[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-InputObject

PSConnection object explicitly provided.

Type: RemoteDesktopManager.PowerShellModule.PSOutputObject.PSConnection
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: true
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Password

Password to access certificate.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 1
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Path

Certificate filepath to check.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 0
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-PrivateKeyPath

Private key file path to access certificate. Leave blank if you do not wish to include a private key.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 2
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-VaultMode

Vault where the command will be applied. Three choices are offered:

  • Default: Current vault that has been set.

  • User: Vault specific to the current user.

  • Global: Global vault of the data source.

Type: Devolutions.RemoteDesktopManager.VaultMode
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases:
- wi
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

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.

Notes

For more information, type "Get-Help Import-RDMX509Certificate -detailed". For technical information, type "Get-Help Import-RDMX509Certificate -full".

Devolutions Forum logo Give us Feedback