Advertisement
Guest User

Set RDP sha1

a guest
Nov 27th, 2014
374
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <#
  2.  
  3. .SYNOPSIS
  4.  
  5.  Sets the SHA1 hash of the SSL certificate you want to use for RDP service.
  6.    
  7.  Usage: Set-RDPSha1Hash.ps <hash>
  8.  
  9. #>
  10. [CmdletBinding()]
  11. param(
  12.      [Parameter(Mandatory=$True,Position=1)]
  13.      [string]$SHA1Hash
  14.    )
  15.  
  16. $a = Get-WmiObject -Namespace ROOT\Cimv2\TerminalServices Win32_TSGeneralSetting -Filter "TerminalName='RDP-Tcp'"
  17. $a.SSLCertificateSHA1Hash = $SHA1Hash
  18. $a.Put()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement