admin管理员组文章数量:1241086
I am trying to configure Remote Desktop (RDP) on my Windows Server to use a specific certificate, but the system keeps using a self-signed certificate instead. I want to bind RDP to a certificate that I have installed in Remote Desktop → Certificates in certlm.msc
.
What I Tried:
Checked which certificate is currently in use:
Get-WmiObject -Namespace "Root\CIMV2\TerminalServices" -Class Win32_TSGeneralSetting | Select-Object TerminalName, SSLCertificateSHA1Hash
- Output shows that RDP is using a self-signed certificate.
Attempted to set the correct certificate using WMIC (via Powershell with Administrator rights):
wmic /namespace:\root\CIMV2\TerminalServices PATH Win32_TSGeneralSetting Set SSLCertificateSHA1Hash="b071217ae12bc2aa5ec0256d4e24c6ce60071a46"
- Error: "Invalid namespace"
Manually checked certlm.msc and confirmed that the certificate I want to use is installed under Remote Desktop → Certificates and issued by a trusted CA.
Tried setting the certificate via PowerShell:
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" -Name SSLCertificateSHA1Hash -Value "b071217ae12bc2aa5ec0256d4e24c6ce60071a46" Restart-Service TermService -Force
- After running this, I checked again, but RDP is still using the wrong certificate.
What I Need Help With:
Why is WMIC returning "Invalid namespace" when trying to set the certificate?
How can I force RDP to use the correct certificate that is already installed?
本文标签:
版权声明:本文标题:powershell - Cannot Bind RDP to Specific Certificate on Windows Server – "Invalid Namespace" Error with WMIC - 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1740078311a2223384.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论