How to Change Network Types using PowerShell in Windows 10?

How Do I Change my network from public to private Windows 10 and Server

This is how to change network types using PowerShell commands in Windows operating systems. In Windows operating system, you find the classifies network connection with three different types which is Public, Private, and Domain. This allows different firewall configurations to be applied based on the type of network, for example, the most restrictive configuration for public and the least restrictive for domain networks. By default, any new network connection is made a public connection and if Active Directory services are found on the network its type is automatically changed to the domain. If you need to force a network to be of a different profile, most commonly to change a public network to a private network the easiest way is to use.

Change Network Types using PowerShell

This is great to use command line interface such as PowerShell to administer and manage Windows task. As a simple user, you don’t need to use the command line but for a business network, an IT expert always needs to use this commands.

In order to change network types using PowerShell in Windows 10 or other Windows, you need to run Windows PowerShell as administrator and type the following command to detect the network types and then change it based on what you need.


The Get-NetConnectionProfile cmdlet gets a connection profile associated with one or more physical network adapters. A connection profile represents a network connection.

Change Network Types using PowerShell
Change Network Types using PowerShell
This command shows all the specific details about the current network type. The network type has been set it on public type. let’s change it to private or domain. Specifies an array of category types of a network. The acceptable values for this parameter are


For changing the network type, you can use the following Powershell command.


The Set-NetConnectionProfile cmdlet changes the network category setting of a connection profile. A connection profile represents a network connection.

To change a public network to a private type, just type the following command and press enter.


How to Change Network Types with PowerShell
How to Change Network Types with PowerShell
That must work perfectly.

The next step just checks the status of the network type with Get-NetConnectionProfile command.

Change Private to Public Network In Windows 10
Change Private to Public Network In Windows 10
That’s all. The network connection profile type has changed successfully.

You can do this at once with a single command suing pipeline as a command separator.

Get-NetConnectionProfile -InterfaceIndex 5 | Set-NetConnectionProfile -NetworkCategory Private

The first part of this command gets the connection profile for the network adapter interface index id of 5. The command passes the results to the Set-NetConnectionProfile cmdlet by using the pipe operator. The second part of the command changes the value of the network category for the connection profile.

Windows Network Connections are Stuck in Public mode

You may be unable to change or set your network connection location when attempting to connect to a network using a Windows 7-based computer. The location associated with the network connection may not be a clickable link.

Cause-Related: This issue can occur if you have at inadvertently selected the checkbox beside the option to Treat all future networks that I connect to as public, and don’t ask me again. Once this option is set, you may be unable to change this setting.

How to Fix it? 

To resolve this issue follow the steps listed below:

  1. Close or suspend any applications that use the network.
  2. Click Start, type device manager in the Search programs and files box, and then press Enter.
  3. Browse the list of devices and click to expand Network adapters
  4. Right-click on the first adapter under Network Adapters and click Disable.(Repeat this step for all network adapters on your system under Network Adapters).Note After each change, Device Manager will rescan your hardware. Your monitor may blink when refreshed, this is expected.
  5. While still in Device Manager, re-enable only the adapter that’s associated with the public-network setting that you are trying to change.
    (Example, if you’re trying to connect to your wireless network, enable the wireless adapter.)Note Your system will notice your network reappearing and try to connect. This connection attempt may fail, but that’s ok, this is expected.
  6. Click Start, and type Network and Sharing Center in the Search programs and files box, and then click Network and Sharing Center, from the list
  7. In the lower left side of the dialog box, click Choose homegroup and sharing options.
  8. Click What is a network location? and select your network location.Note If you want to continue setting up a homegroup, follow the remaining prompts. But a homegroup isn’t required, so you also can simply exit the homegroup setup after you select the correct network location.
  9. The last step is to re-enable your remaining adapters, one by one in Device Manager. To do this simply Right-click each of the disabled adapters under Network Adapters and click Enable.
  10. When all Network Adapters are enabled, close the Device Manager and you’re done.

That is all you need to do to change network types using PowerShell. Good luck, and share us the technical issue via the comment section.

Related Queries:

Powershell change network type windows 7
Change network from public to private windows 7 command line
Change network from public to domain server 2012
Change from public to domain network windows 10
Change VPN from public to private windows 10
How to change public network to private network in windows 10
Get-netconnectionprofile windows 7
Windows server 2016 change network type to domain

You might also like

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.