PowerShell Logo Small

Set-RDCertificate



This is the built-in help made by Microsoft for the command 'Set-RDCertificate', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

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

SYNTAX


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



Search powershellhelp.space

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.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=294254
Get-RDCertificate
New-RDCertificate

REMARKS

<

Examples


Example 1: Import a certificate to use with RDS

PS C:\> $Password = ConvertTo-SecureString -String "Cups34Horses&&" -AsPlainText -ForcePS C:\>Set-RDCertificate -Role RDRedirector -ImportPath
"C:\Certificates\Redirector07.pfx" -Password $Password -ConnectionBroker "RDCB.Contoso.com"



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 RDConnection Broker named RDCB.Contoso.com. The command uses the secure
string stored in the $Password variable to help secure the certificate.




Example 2: Apply a secure string to a certificate

PS C:\> $Password = ConvertTo-SecureString -String "Wings%%83Potato" -AsPlainText -ForcePS C:\>Set-RDCertificate -Role RDRedirector -Password $Password -ConnectionBroker
"RDCB.Contoso.com"



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 RDConnection Broker named
RDCB.Contoso.com.