In one of my previous articles, I wrote how you can change the network location type (Public or Private) in Windows 10. Today, I would like to share with you how it can be done with PowerShell.
When you are signing in to your account for the very first time, Windows 10 asks you which kind of network you are connecting to: Home or Public.
If you pick Yes, the OS will configure it as a private network and turn on network discovery. For a Public network, discovery and access will be limited. You won't be able to browse the Windows network from other PCs and their shares. If you need to access your computer from a remote PC or browse the PCs and devices on your local network, you need to set it to Home (Private). Here is how you can do it using PowerShell.
PowerShell is an advanced form of command prompt. It is extended with a huge set of ready-to-use cmdlets and comes with the ability to use .NET framework/C# in various scenarios.
To change network location type with PowerShell in Windows 10
- Open PowerShell as Administrator.
- Type or copy-paste the following command:
- In the command output, see the line "Name". It contains the name of your network which you need to use with the next command.
- To set the network location type to Public, type or copy paste the following command:
Set-NetConnectionProfile -Name "Your Network Name" -NetworkCategory Public
Replace the "Your Network Name" with your actual network name you got from the previous command.Your network location type will be set to Public.
- To set the network location type to Private, type or copy paste the following command:
Set-NetConnectionProfile -Name "Your Network Name" -NetworkCategory Private
Replace the "Your Network Name" with your actual network name you got from the Get-NetConnectionProfile command.
Your network location type will be set to Public.