{"id":4391,"date":"2019-12-06T06:49:26","date_gmt":"2019-12-06T06:49:26","guid":{"rendered":"https:\/\/pariswells.com\/blog\/?p=4391"},"modified":"2023-03-20T23:53:58","modified_gmt":"2023-03-20T23:53:58","slug":"how-to-change-the-remote-gateway-address-in-rdp-file-for-gateway","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/research\/how-to-change-the-remote-gateway-address-in-rdp-file-for-gateway","title":{"rendered":"How to change the Remote Gateway Host Address and Port in RDP file\\shortcut for Gateway"},"content":{"rendered":"\n<p>Recently during a DR Test we wanted to change the Address on the RDP file that was being downloaded from the Remote Desktop Gateway.<\/p>\n\n\n\n<p>Someone had put together a nicescript that can do it here :&nbsp;<\/p>\n\n\n\n<p><a href=\"https:\/\/gallery.technet.microsoft.com\/Change-published-FQDN-for-2a029b80\">https:\/\/gallery.technet.microsoft.com\/Change-published-FQDN-for-2a029b80<\/a><\/p>\n\n\n\n<p>This changed the&nbsp;<strong>internal server&nbsp;<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"551\" height=\"331\" src=\"https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2020\/04\/img_5ea67655c0426.png\" alt=\"\" class=\"wp-image-4577 img-responsive\" srcset=\"https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2020\/04\/img_5ea67655c0426.png 551w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2020\/04\/img_5ea67655c0426-300x180.png 300w\" sizes=\"auto, (max-width: 551px) 100vw, 551px\" \/><\/figure>\n\n\n\n<p>However the file still has the old address for RD Gateway server ( in this line : gatewayhostname:s: )<\/p>\n\n\n\n<p>You can change this using powershell per below on the RDP Connection Broker<\/p>\n\n\n\n<p>Import-Module RemoteDesktop<\/p>\n\n\n\n<p>Set-RDSessionCollectionConfiguration -CollectionName &#8220;Finance Staff RDP&#8221; -CustomRdpProperty &#8220;gatewayhostname:s:office.domain.<strong>com:444<\/strong>&#8220;<\/p>\n\n\n\n<p>Changes this your&nbsp;<strong>External Server<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"547\" height=\"550\" src=\"https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2020\/04\/img_5ea6763080dca.png\" alt=\"\" class=\"wp-image-4576 img-responsive\" srcset=\"https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2020\/04\/img_5ea6763080dca.png 547w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2020\/04\/img_5ea6763080dca-298x300.png 298w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2020\/04\/img_5ea6763080dca-150x150.png 150w\" sizes=\"auto, (max-width: 547px) 100vw, 547px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Recently during a DR Test we wanted to change the Address on the RDP file that was being downloaded from the Remote Desktop Gateway. Someone had put [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1502,3217,3218,3105,3219,3104,3112],"class_list":["post-4391","post","type-post","status-publish","format-standard","hentry","category-research","tag-gateway","tag-port-change","tag-port-redirection","tag-rdp-file","tag-rdp-gateway","tag-set-rdpublishedname-ps1","tag-shortcut"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/4391","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=4391"}],"version-history":[{"count":4,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/4391\/revisions"}],"predecessor-version":[{"id":6781,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/4391\/revisions\/6781"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=4391"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=4391"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=4391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}