{"id":6241,"date":"2019-03-12T23:27:05","date_gmt":"2019-03-12T22:27:05","guid":{"rendered":"https:\/\/michlstechblog.info\/blog\/?p=6241"},"modified":"2019-03-13T13:29:05","modified_gmt":"2019-03-13T12:29:05","slug":"windows-set-machine-certificate-as-remote-desktop-certificate","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/windows-set-machine-certificate-as-remote-desktop-certificate\/","title":{"rendered":"Windows: Set Machine certificate as Remote Desktop Certificate"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_6241 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_6241')){$('.twoclick_social_bookmarks_post_6241').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"Windows%3A%20Set%20Machine%20certificate%20as%20Remote%20Desktop%20Certificate\",\"the_excerpt\":\"Hi%0D%0A%0D%0Aif%20a%20Windows%20computer%20is%20member%20of%20a%20domain%20and%20the%20certificate%20autoenrollment%20is%20in%20place%20then%20you%20can%20use%20the%20machine%20certificate%20provided%20by%20the%20active%20directory%20as%20the%20RDP%20TLS%20certificate.%0D%0A%20%28more%26hellip%3B%29\",\"txt_info\":\"2 clicks for more data protection:\\r\\n\\r\\nOnly when you click here, the button will be come active and you can send your recommendation to Flattr. When activating, data are transmitted to third parties. \",\"perma_option\":\"off\"}},\"txt_help\":\"When you activate these fields by clicking, information to Flattr may be transferred abroad, and probably may also stored there.\",\"settings_perma\":\"Enable permanently and accept data transmission. \",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/michlstechblog.info\\\/blog\\\/windows-set-machine-certificate-as-remote-desktop-certificate\\\/\",\"post_id\":6241,\"post_title_referrer_track\":\"Windows%3A+Set+Machine+certificate+as+Remote+Desktop+Certificate\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hi<\/p>\n<p>if a Windows computer is member of a domain and the certificate autoenrollment is in place then you can use the machine certificate provided by the active directory as the RDP TLS certificate.<br \/>\n<!--more--><br \/>\nGet Remote Desktop WMI Path<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$oTSWMIPath = (Get-WmiObject -Namespace root\\cimv2\\terminalservices -class &quot;Win32_TSGeneralSetting&quot; -Filter &quot;TerminalName='RDP-tcp'&quot;).__path\r\n<\/pre>\n<p>Get the Machine Certificate issued by your domain<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$oWMIComputer=Get-WmiObject -class &quot;Win32_ComputerSystem&quot; -Filter &quot;DomainRole=1&quot;\r\nif($oWMIComputer)\r\n{\r\n    $oDomainCert=get-item Cert:\\LocalMachine\\My\\*|?{$_.Subject -match (&quot;^CN=&quot;+$oWMIComputer.Name+&quot;.&quot;+$oWMIComputer.Domain+'$')}\r\n}\r\n<\/pre>\n<p>Just one certificate found?<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nif($oDomainCert.Count -eq 1)\r\n{\r\n    Set-WmiInstance -Path $oTSWMIPath -argument @{SSLCertificateSHA1Hash=$oDomainCert.Thumbprint}\r\n}\r\n<\/pre>\n<p>Michael<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi if a Windows computer is member of a domain and the certificate autoenrollment is in place then you can use the machine certificate provided by the active directory as the RDP TLS certificate.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1265,5],"tags":[95,1325,1326,1327,20],"class_list":["post-6241","post","type-post","status-publish","format-standard","hentry","category-active-directory","category-windowsknowhow","tag-active-directory","tag-machine-certificate","tag-remote-desktop-certificate","tag-terminal-services","tag-windows-2"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/6241","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/comments?post=6241"}],"version-history":[{"count":9,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/6241\/revisions"}],"predecessor-version":[{"id":6250,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/6241\/revisions\/6250"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=6241"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=6241"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=6241"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}