{"id":1657,"date":"2025-10-26T23:57:16","date_gmt":"2025-10-26T23:57:16","guid":{"rendered":"https:\/\/www.ultrexstaff.com\/?p=1657"},"modified":"2025-10-26T23:57:16","modified_gmt":"2025-10-26T23:57:16","slug":"changing-network-connection-profile-to-private-vs-public-by-powershell-in-2-commands","status":"publish","type":"post","link":"https:\/\/www.ultrexstaff.com\/?p=1657","title":{"rendered":"Changing network connection profile to private vs public by powershell in 2 commands"},"content":{"rendered":"\n<p>Get-NetConnectionProfile<\/p>\n\n\n\n<p>Set-NetConnectionProfile -InterfaceIndex &lt;InterfaceIndex&gt; -NetworkCategory Private<\/p>\n\n\n\n<p>Set-NetConnectionProfile -InterfaceIndex 16 -NetworkCategory Private<\/p>\n\n\n\n<p>Get-NetConnectionProfile<\/p>\n\n\n\n<p>To change a network from&nbsp;<strong>Public<\/strong>&nbsp;to&nbsp;<strong>Private<\/strong>&nbsp;you can use several methods. Since the graphical interface in Server editions doesn\u2019t always provide this option, PowerShell is often the most straightforward approach.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\ud83d\udd27 Using PowerShell<\/strong><\/h3>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li><strong>Open PowerShell as Administrator<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Right-click the\u00a0<strong>Start<\/strong>\u00a0button and select\u00a0<strong>Windows PowerShell (Admin)<\/strong>.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Identify the Network Interface<\/strong>:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-NetConnectionProfile<\/code><\/pre>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li>This command lists all network interfaces and their current profiles.<\/li>\n\n\n\n<li><strong>Change the Network Category<\/strong>:Replace\u00a0&lt;InterfaceIndex>\u00a0with the actual index number of your network adapter.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>Set-NetConnectionProfile -InterfaceIndex &lt;InterfaceIndex&gt; -NetworkCategory Private<\/code><\/pre>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>For example, if your interface index is 8:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>Set-NetConnectionProfile -InterfaceIndex 8 -NetworkCategory Private<\/code><\/pre>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li><\/li>\n\n\n\n<li><strong>Verify the Change<\/strong>:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-NetConnectionProfile<\/code><\/pre>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li>Ensure that the\u00a0NetworkCategory\u00a0is now set to\u00a0Private.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Get-NetConnectionProfile Set-NetConnectionProfile -InterfaceIndex &lt;InterfaceIndex&gt; -NetworkCategory Private Set-NetConnectionProfile -InterfaceIndex 16 -NetworkCategory Private Get-NetConnectionProfile To change a network from&nbsp;Public&nbsp;to&nbsp;Private&nbsp;you can use several methods. Since the graphical interface in Server editions doesn\u2019t always provide this option, PowerShell is often the most straightforward approach. \ud83d\udd27 Using PowerShell<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[121,120],"tags":[],"class_list":["post-1657","post","type-post","status-publish","format-standard","hentry","category-networking","category-windows","post-preview"],"_links":{"self":[{"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=\/wp\/v2\/posts\/1657","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1657"}],"version-history":[{"count":1,"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=\/wp\/v2\/posts\/1657\/revisions"}],"predecessor-version":[{"id":1658,"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=\/wp\/v2\/posts\/1657\/revisions\/1658"}],"wp:attachment":[{"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1657"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1657"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1657"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}