{"id":4164,"date":"2022-06-09T09:22:27","date_gmt":"2022-06-09T16:22:27","guid":{"rendered":"https:\/\/SUMMALAI.COM\/?p=4164"},"modified":"2022-06-09T09:22:28","modified_gmt":"2022-06-09T16:22:28","slug":"how-to-set-dns-suffix-and-registration-using-powershell","status":"publish","type":"post","link":"https:\/\/SUMMALAI.COM\/?p=4164","title":{"rendered":"How to Set DNS Suffix and Registration Using PowerShell"},"content":{"rendered":"\n<p>This very simple PowerShell script can be used to set these options:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>DNS Suffix for this connection<\/li><li>Register this connection\u2019s addresses in DNS<\/li><li>Use this connection\u2019s DNS suffix in DNS registration<\/li><\/ul>\n\n\n\n<p>I\u2019ve seen many questions online on how to use a script to mark the two checkboxes in this \u201cAdvanced TCP\/IP Settings\u201d window.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.boriskagan.net\/wp-content\/uploads\/2017\/02\/dns-suffix.png\" alt=\"\" class=\"wp-image-95\"\/><\/figure><\/div>\n\n\n<p>So here is the very short and simple PowerShell script:PowerShell<\/p>\n\n\n\n<p class=\"has-text-align-left\"><em><strong>$networkConfig = Get-WmiObject Win32_NetworkAdapterConfiguration -filter &#8220;ipenabled = &#8216;tr<\/strong><\/em><strong><em>ue'&#8221;<\/em><\/strong><\/p>\n\n\n\n<p class=\"has-text-align-left\"><strong><em>$networkConfig.SetDnsDomain(&#8220;clients.ad.company.com&#8221;)<\/em><\/strong><\/p>\n\n\n\n<p class=\"has-text-align-left\"><strong><em>$networkConfig.SetDynamicDNSRegistration($true,$true)<\/em><\/strong><\/p>\n\n\n\n<p class=\"has-text-align-left\"><strong><em>ipconfig \/registerdns<\/em><\/strong><\/p>\n\n\n\n<p>The first line gets the adapters with a valid IP address. The second line sets the \u201cDNS suffix for this connection\u201d field. The third line enables each of the two checkboxes \u2013 if you change one of the $true values to $false, it will uncheck the corresponding checkbox. Finally, the last line simply updates the new settings in DNS without the need to restart the machine or anything like that.<\/p>\n\n\n\n<p>Ref:  https:\/\/www.boriskagan.net\/how-to-set-dns-suffix-and-registration-using-powershell\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This very simple PowerShell script can be used to set these options: DNS Suffix for this connection Register this connection\u2019s addresses in DNS Use this connection\u2019s DNS suffix in DNS registration I\u2019ve seen many questions online on how to use a script to mark the two checkboxes in this \u201cAdvanced TCP\/IP Settings\u201d window. So here <a class=\"read-more\" href=\"https:\/\/SUMMALAI.COM\/?p=4164\">Read More<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[10,14,15],"tags":[1186,1187],"class_list":["post-4164","post","type-post","status-publish","format-standard","hentry","category-microsoft","category-windows-7-8-10","category-windows-servers","tag-set-dns-suffix-and-registration-using-powershell","tag-set-dns-suffix-on-powershell"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"description\" content=\"This very simple PowerShell script can be used to set these options: DNS Suffix for this connectionRegister this connection\u2019s addresses in DNSUse this connection\u2019s DNS suffix in DNS registration I\u2019ve seen many questions online on how to use a script to mark the two checkboxes in this \u201cAdvanced TCP\/IP Settings\u201d window. So here is the\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Summa Lai\"\/>\n\t<meta name=\"keywords\" content=\"set dns suffix and registration using powershell,set dns suffix on powershell,microsoft family,windows 7\/8\/10\/11,windows servers\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/SUMMALAI.COM\/?p=4164\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=4164#article\",\"name\":\"How to Set DNS Suffix and Registration Using PowerShell | Summa Lai\",\"headline\":\"How to Set DNS Suffix and Registration Using PowerShell\",\"author\":{\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?author=2#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.boriskagan.net\\\/wp-content\\\/uploads\\\/2017\\\/02\\\/dns-suffix.png\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=4164\\\/#articleImage\"},\"datePublished\":\"2022-06-09T09:22:27-07:00\",\"dateModified\":\"2022-06-09T09:22:28-07:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=4164#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=4164#webpage\"},\"articleSection\":\"Microsoft Family, Windows 7\\\/8\\\/10\\\/11, Windows Servers, Set DNS Suffix and Registration Using PowerShell, Set DNS Suffix on PowerShell\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=4164#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/SUMMALAI.COM\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?cat=10#listItem\",\"name\":\"Microsoft Family\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?cat=10#listItem\",\"position\":2,\"name\":\"Microsoft Family\",\"item\":\"https:\\\/\\\/SUMMALAI.COM\\\/?cat=10\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?cat=14#listItem\",\"name\":\"Windows 7\\\/8\\\/10\\\/11\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?cat=14#listItem\",\"position\":3,\"name\":\"Windows 7\\\/8\\\/10\\\/11\",\"item\":\"https:\\\/\\\/SUMMALAI.COM\\\/?cat=14\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=4164#listItem\",\"name\":\"How to Set DNS Suffix and Registration Using PowerShell\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?cat=10#listItem\",\"name\":\"Microsoft Family\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=4164#listItem\",\"position\":4,\"name\":\"How to Set DNS Suffix and Registration Using PowerShell\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?cat=14#listItem\",\"name\":\"Windows 7\\\/8\\\/10\\\/11\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/#person\",\"name\":\"sladmin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=4164#personImage\",\"url\":\"https:\\\/\\\/SUMMALAI.COM\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/Summa_Logo-150x150.png\",\"width\":96,\"height\":96,\"caption\":\"sladmin\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?author=2#author\",\"url\":\"https:\\\/\\\/SUMMALAI.COM\\\/?author=2\",\"name\":\"Summa Lai\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=4164#authorImage\",\"url\":\"https:\\\/\\\/SUMMALAI.COM\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/Summa_Logo-150x150.png\",\"width\":96,\"height\":96,\"caption\":\"Summa Lai\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=4164#webpage\",\"url\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=4164\",\"name\":\"How to Set DNS Suffix and Registration Using PowerShell | Summa Lai\",\"description\":\"This very simple PowerShell script can be used to set these options: DNS Suffix for this connectionRegister this connection\\u2019s addresses in DNSUse this connection\\u2019s DNS suffix in DNS registration I\\u2019ve seen many questions online on how to use a script to mark the two checkboxes in this \\u201cAdvanced TCP\\\/IP Settings\\u201d window. So here is the\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=4164#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?author=2#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?author=2#author\"},\"datePublished\":\"2022-06-09T09:22:27-07:00\",\"dateModified\":\"2022-06-09T09:22:28-07:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/#website\",\"url\":\"https:\\\/\\\/SUMMALAI.COM\\\/\",\"name\":\"Summa Lai\",\"description\":\"Never Stop Learning, Building a Little Wiki...\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"How to Set DNS Suffix and Registration Using PowerShell | Summa Lai","description":"This very simple PowerShell script can be used to set these options: DNS Suffix for this connectionRegister this connection\u2019s addresses in DNSUse this connection\u2019s DNS suffix in DNS registration I\u2019ve seen many questions online on how to use a script to mark the two checkboxes in this \u201cAdvanced TCP\/IP Settings\u201d window. So here is the","canonical_url":"https:\/\/SUMMALAI.COM\/?p=4164","robots":"max-image-preview:large","keywords":"set dns suffix and registration using powershell,set dns suffix on powershell,microsoft family,windows 7\/8\/10\/11,windows servers","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/SUMMALAI.COM\/?p=4164#article","name":"How to Set DNS Suffix and Registration Using PowerShell | Summa Lai","headline":"How to Set DNS Suffix and Registration Using PowerShell","author":{"@id":"https:\/\/SUMMALAI.COM\/?author=2#author"},"publisher":{"@id":"https:\/\/SUMMALAI.COM\/#person"},"image":{"@type":"ImageObject","url":"https:\/\/www.boriskagan.net\/wp-content\/uploads\/2017\/02\/dns-suffix.png","@id":"https:\/\/SUMMALAI.COM\/?p=4164\/#articleImage"},"datePublished":"2022-06-09T09:22:27-07:00","dateModified":"2022-06-09T09:22:28-07:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/SUMMALAI.COM\/?p=4164#webpage"},"isPartOf":{"@id":"https:\/\/SUMMALAI.COM\/?p=4164#webpage"},"articleSection":"Microsoft Family, Windows 7\/8\/10\/11, Windows Servers, Set DNS Suffix and Registration Using PowerShell, Set DNS Suffix on PowerShell"},{"@type":"BreadcrumbList","@id":"https:\/\/SUMMALAI.COM\/?p=4164#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM#listItem","position":1,"name":"Home","item":"https:\/\/SUMMALAI.COM","nextItem":{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM\/?cat=10#listItem","name":"Microsoft Family"}},{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM\/?cat=10#listItem","position":2,"name":"Microsoft Family","item":"https:\/\/SUMMALAI.COM\/?cat=10","nextItem":{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM\/?cat=14#listItem","name":"Windows 7\/8\/10\/11"},"previousItem":{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM\/?cat=14#listItem","position":3,"name":"Windows 7\/8\/10\/11","item":"https:\/\/SUMMALAI.COM\/?cat=14","nextItem":{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM\/?p=4164#listItem","name":"How to Set DNS Suffix and Registration Using PowerShell"},"previousItem":{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM\/?cat=10#listItem","name":"Microsoft Family"}},{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM\/?p=4164#listItem","position":4,"name":"How to Set DNS Suffix and Registration Using PowerShell","previousItem":{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM\/?cat=14#listItem","name":"Windows 7\/8\/10\/11"}}]},{"@type":"Person","@id":"https:\/\/SUMMALAI.COM\/#person","name":"sladmin","image":{"@type":"ImageObject","@id":"https:\/\/SUMMALAI.COM\/?p=4164#personImage","url":"https:\/\/SUMMALAI.COM\/wp-content\/uploads\/2020\/05\/Summa_Logo-150x150.png","width":96,"height":96,"caption":"sladmin"}},{"@type":"Person","@id":"https:\/\/SUMMALAI.COM\/?author=2#author","url":"https:\/\/SUMMALAI.COM\/?author=2","name":"Summa Lai","image":{"@type":"ImageObject","@id":"https:\/\/SUMMALAI.COM\/?p=4164#authorImage","url":"https:\/\/SUMMALAI.COM\/wp-content\/uploads\/2020\/05\/Summa_Logo-150x150.png","width":96,"height":96,"caption":"Summa Lai"}},{"@type":"WebPage","@id":"https:\/\/SUMMALAI.COM\/?p=4164#webpage","url":"https:\/\/SUMMALAI.COM\/?p=4164","name":"How to Set DNS Suffix and Registration Using PowerShell | Summa Lai","description":"This very simple PowerShell script can be used to set these options: DNS Suffix for this connectionRegister this connection\u2019s addresses in DNSUse this connection\u2019s DNS suffix in DNS registration I\u2019ve seen many questions online on how to use a script to mark the two checkboxes in this \u201cAdvanced TCP\/IP Settings\u201d window. So here is the","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/SUMMALAI.COM\/#website"},"breadcrumb":{"@id":"https:\/\/SUMMALAI.COM\/?p=4164#breadcrumblist"},"author":{"@id":"https:\/\/SUMMALAI.COM\/?author=2#author"},"creator":{"@id":"https:\/\/SUMMALAI.COM\/?author=2#author"},"datePublished":"2022-06-09T09:22:27-07:00","dateModified":"2022-06-09T09:22:28-07:00"},{"@type":"WebSite","@id":"https:\/\/SUMMALAI.COM\/#website","url":"https:\/\/SUMMALAI.COM\/","name":"Summa Lai","description":"Never Stop Learning, Building a Little Wiki...","inLanguage":"en-US","publisher":{"@id":"https:\/\/SUMMALAI.COM\/#person"}}]}},"aioseo_meta_data":{"post_id":"4164","title":null,"description":null,"keywords":[],"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":{"id":"#aioseo-article-65a0ce76d0254","slug":"article","graphName":"Article","label":"Article","properties":{"type":"BlogPosting","name":"#post_title","headline":"#post_title","description":"#post_excerpt","image":"","keywords":"","author":{"name":"#author_name","url":"#author_url"},"dates":{"include":true,"datePublished":"","dateModified":""}}},"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":"{\"article\":{\"articleType\":\"BlogPosting\"},\"course\":{\"name\":\"\",\"description\":\"\",\"provider\":\"\"},\"faq\":{\"pages\":[]},\"product\":{\"reviews\":[]},\"recipe\":{\"ingredients\":[],\"instructions\":[],\"keywords\":[]},\"software\":{\"reviews\":[],\"operatingSystems\":[]},\"webPage\":{\"webPageType\":\"WebPage\"}}","pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2022-06-04 19:48:16","updated":"2024-01-12 05:30:30","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/SUMMALAI.COM\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/SUMMALAI.COM\/?cat=10\" title=\"Microsoft Family\">Microsoft Family<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/SUMMALAI.COM\/?cat=14\" title=\"Windows 7\/8\/10\/11\">Windows 7\/8\/10\/11<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tHow to Set DNS Suffix and Registration Using PowerShell\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/SUMMALAI.COM"},{"label":"Microsoft Family","link":"https:\/\/SUMMALAI.COM\/?cat=10"},{"label":"Windows 7\/8\/10\/11","link":"https:\/\/SUMMALAI.COM\/?cat=14"},{"label":"How to Set DNS Suffix and Registration Using PowerShell","link":"https:\/\/SUMMALAI.COM\/?p=4164"}],"_links":{"self":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/4164","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4164"}],"version-history":[{"count":3,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/4164\/revisions"}],"predecessor-version":[{"id":4178,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/4164\/revisions\/4178"}],"wp:attachment":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4164"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4164"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4164"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}