RDP Server Certificate
1
Create Template Object in Active Directory
$ConfigPath = (Get-ADRootDSE).configurationNamingContext
$TemplateContainer = "CN=Certificate Templates,CN=Public Key Services,CN=Services,$ConfigPath"
$Name = "SCEPmanRdpServer"
New-ADObject -Name $Name `
-Type pKICertificateTemplate `
-Path $TemplateContainer `
-OtherAttributes @{
"displayName" = $Name;
"msPKI-Cert-Template-OID" = "1.3.6.1.4.1.311.21.8.$(Get-Random 9999999).$(Get-Random 9999999)";
"msPKI-Template-Schema-Version" = 1;
"msPKI-Template-Minor-Revision" = 1;
"msPKI-RA-Signature" = 0;
"flags" = 0
}3
Configure Group Policy
Computer Configuration
└-Policies
└-Administrative Templates
└-Windows Components
└-Remote Desktop Services
└-Remote Desktop Session Host
└-Security
└-Server authentication certificate template
└-Require use of specific security layer for remote (RDP) connectionsServer authentication certificate template

Require use of specific security layer for remote (RDP) connections

(Get-CimInstance -Class Win32_TSGeneralSetting -Namespace root\cimv2\terminalservices -Filter "TerminalName='RDP-tcp'").SSLCertificateSHA1HashGet-WinEvent -LogName "System" | Where-Object { $_.ProviderName -eq "Microsoft-Windows-TerminalServices-RemoteConnectionManager" } | Select-Object -First 10 | Format-List Message, TimeCreatedLast updated
Was this helpful?