Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <#
- .SYNOPSIS
- Sets the SHA1 hash of the SSL certificate you want to use for RDP service.
- Usage: Set-RDPSha1Hash.ps <hash>
- #>
- [CmdletBinding()]
- param(
- [Parameter(Mandatory=$True,Position=1)]
- [string]$SHA1Hash
- )
- $a = Get-WmiObject -Namespace ROOT\Cimv2\TerminalServices Win32_TSGeneralSetting -Filter "TerminalName='RDP-Tcp'"
- $a.SSLCertificateSHA1Hash = $SHA1Hash
- $a.Put()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement