Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Set-RDCertificate

Set-RDCertificate

remotedesktop.psm1

Synopsis

Imports and secures a certificate to use with an RDS role.

Syntax

Set-RDCertificate [-Role] [-ConnectionBroker] [-Force] [-Password] [<CommonParameters>]

Set-RDCertificate [-Role] [-ConnectionBroker] [-Force] [-ImportPath] [-Password] [<CommonParameters>]

Detailed Description

The Set-RDCertificate cmdlet imports a certificate to use with a Remote Desktop Services (RDS) role. The cmldet helps secure a certificate by using a secure string supplied by the user. You can use this cmdlet to apply a new secure string for an existing certificate.

Parameters

-ConnectionBroker <String>

Specifies the Remote Desktop Connection Broker (RD Connection Broker) server for a Remote Desktop deployment. If you do not specify a value, the cmdlet uses the fully qualified domain name (FQDN) of the local computer.

Aliases

None

Required?

false

Position

named

Default value

Accept pipeline input?

false

Accept wildcard characters?

false

-Force <SwitchParameter>

Performs the action without a confirmation message.

Aliases

None

Required?

false

Position

named

Default value

Accept pipeline input?

false

Accept wildcard characters?

false

-ImportPath <String>

Specifies the location of a certificate as a file that has a .pfx extension.

Aliases

None

Required?

false

Position

named

Default value

Accept pipeline input?

false

Accept wildcard characters?

false

-Password <SecureString>

Specifies a secure string used to help secure the certificate. See the Examples section.

Aliases

None

Required?

false

Position

named

Default value

Accept pipeline input?

false

Accept wildcard characters?

false

-Role <RDCertificateRole>

Specifies a certificate type associated with an RDS server role. The acceptable values for this parameter are:  -- RDGateway -- RDWebAccess -- RDRedirector -- RDPublishing

Aliases

None

Required?

true

Position

1

Default value

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type


Return Type

Null

Notes

None

Examples

Example 1: Import a certificate to use with RDS

This example imports a certificate to use with an RDS role.

The first command uses the ConvertTo-SecureString cmdlet to create a secure string based on a string that the user supplies, and stores it in the $Password variable. For more information, type Get-Help ConvertTo-SecureString.

The second command specifies the file name of the certificate to use for the redirector role for the RD Connection Broker named RDCB.Contoso.com. The command uses the secure string stored in the $Password variable to help secure the certificate.

PS C:\> $Password = ConvertTo-SecureString -String "Cups34Horses&&" -AsPlainText -Force

Example 2: Apply a secure string to a certificate

This example applies a new secure string to a certificate used for an RDS role.

The first command uses the ConvertTo-SecureString cmdlet to create a secure string based on a string that the user supplies, and stores it in the $Password variable.

The second command uses the secure string stored in the $Password variable to secure the certificate used for the redirector role for the RD Connection Broker named RDCB.Contoso.com.

PS C:\> $Password = ConvertTo-SecureString -String "Wings%%83Potato" -AsPlainText -Force

Online Version
Get-RDCertificate
New-RDCertificate