Windows 10: Set Network Location to Private or Public in Windows 10  

Page 1 of 11 123 ... LastLast
    Set Network Location to Private or Public in Windows 10

    Set Network Location to Private or Public in Windows 10

    How to Set Network Location to be Public or Private in Windows 10
    Published by Category: Network & Sharing
    22 Mar 2017
    Designer Media Ltd

    Published by


    Brink's Avatar
    Administrator

    Posts: 20,683

    Show Printable Version 


    How to Set Network Location to be Public or Private in Windows 10

    information   Information
    A network location identifies the type of network that a PC is connected to with a network adapter.

    The first time you connect to a network, you might be asked if you want to find PCs, devices, and content on the network, and automatically connect to devices like printers and TVs. Turning on this setting prepares your PC for sharing files and devices on a network. Based on the network location you choose, Windows will automatically assign a network discovery state to the network and automatically sets the appropriate Windows Firewall and security settings for the type of network that you connected to. You can change the network location anytime.

    This tutorial will show you how to set the network on your PC to be connected to a domain, public, or private type of location for all users in Windows 10.

    You must be signed in as an administrator to be able to change the network location of a network adapter.

    Note   Note
    Public network = By default, the public network location type is assigned to any new networks when they are first connected. A public network is considered to be shared with the world, with no protection between the local computer and any other computer. Therefore, the Windows Firewall rules associated with the public profile are the most restrictive. This blocks the following apps and services from working: PlayTo, file sharing, network discovery, and automatic setup of network printers, TVs, and other devices.

    Private network = A private network location type can be for home or small office networks, or when you know and trust the people and devices on the network. This setting allows your PC to connect to a homegroup and devices on the network, such as printers.

    Domain network = The domain network location type is detected when the local computer is a member of an Active Directory domain, and the local computer can authenticate to a domain controller for that domain through one of its network connections.


    CONTENTS:
    • Option One: To Change a Network Location in Settings app
    • Option Two: To Change a Network Location in Registry Editor
    • Option Three: To Change a Network Location Local Security Policy
    • Option Four: To Change a Network Location in PowerShell
    • Option Five: To Change Network Location of Current Network Connection in PowerShell
    • Option Six: To Change Network Location of Current Network Connection using a VBS file



    EXAMPLE: Network Location of adapter in "Network and Sharing Center"
    Click image for larger version. 

Name:	Public_network.png 
Views:	7042 
Size:	36.7 KB 
ID:	20994
    Click image for larger version. 

Name:	Private_network.png 
Views:	3955 
Size:	37.3 KB 
ID:	20993
    Click image for larger version. 

Name:	Domain_network.png 
Views:	2776 
Size:	37.0 KB 
ID:	20980






    Set Network Location to Private or Public in Windows 10 OPTION ONE Set Network Location to Private or Public in Windows 10
    To Change a Network Location in Settings app

    1. Do step 2 or step 3 below for how you would like to open Network settings.

    2. Click/tap on your network system icon in the taskbar notification area, click/tap on the Network settings link, and go to step 4 below. (see screenshot below)

    Name:  Network_Settings_taskbar.png
Views: 628887
Size:  114.4 KB

    3. Open Settings, click/tap on the Network & Internet icon, and go to step 4 below.

    4. Do step 5 (Ethernet) or step 6 (Wi-Fi) below for you currently connected network.


     5. To Change Network Location of Ethernet Network

    A) Click/tap on Ethernet on the left side, click/tap on the Ethernet connection (ex: Brink-Router2) on the right side you are currently connected to, and go to step 7 below. (see screenshot below)
    Click image for larger version. 

Name:	Network_Location_Ethernet_Settings-1.png 
Views:	15953 
Size:	34.5 KB 
ID:	20981


     6. To Change Network Location of Wi-Fi Network

    A) Click/tap on Wi-Fi on the left side, click/tap on the Manage known networks link. (see screenshot below)

    Click image for larger version. 

Name:	Metered_Network_Settings-1.png 
Views:	7697 
Size:	63.1 KB 
ID:	71575

    B) Click/tap on the wireless network name (ex: Brink-Router2) you are currently connected to, click/tap on Properties, and go to step 7 below. (see screenshot below)

    Name:  Metered_Network_Settings-2.png
Views: 421674
Size:  19.0 KB


    7. Do step 8 (Private) or step 9 (Public) below for the network location you want.
    Note   Note
    Make this PC discoverable settings will not be available if you have UAC set to Always notify. Setting UAC to a different level will allow Make this PC discoverable settings to be available.

    Make this PC discoverable settings will not be available if you have a Hyper-V virtual switch with this Ethernet connection.

    Click image for larger version. 

Name:	Hyper-V_virtual_switch_network_connection.png 
Views:	1817 
Size:	23.8 KB 
ID:	76388



     8. To Change to a Private Network Location

    A) Turn on Make this PC discoverable, and go to step 10 below. (see screenshots below)
    Click image for larger version. 

Name:	Network_Location_Settings-2.png 
Views:	8426 
Size:	188.2 KB 
ID:	52093

     9. To Change to a Public Network Location

    A) Turn off Make this PC discoverable, and go to step 10 below. (see screenshots below)
    Click image for larger version. 

Name:	Network_Location_Settings-3.png 
Views:	3555 
Size:	189.4 KB 
ID:	52094

    10. When finished, you can close Settings if you like.






    Set Network Location to Private or Public in Windows 10 OPTION TWO Set Network Location to Private or Public in Windows 10
    To Change a Network Location in Registry Editor

    1. Type regedit in the search box (Windows+Q) on Start or taskbar, and press Enter to open Registry Editor.

    2. If prompted by UAC, click/tap on Yes.

    3. In Registry Editor, navigate to the location below. (see screenshot below)

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles

    Name:  Network_Location_registry-1.png
Views: 97901
Size:  24.0 KB

    4. Double click/tap on the Profiles key in the left pane to expand it. Click/tap on each long GUID number subkey, and look at it's ProfileName string value in the right pane to see if it has the current network name (ex: Network) until found. (see screenshot below)

    Click image for larger version. 

Name:	Network_Location_registry-2.png 
Views:	2995 
Size:	41.3 KB 
ID:	20987

    5. When you find the correct ProfileName for your network name, double click/tap on the Category DWORD value in the same right pane to modify it. (see screenshot below)

    Click image for larger version. 

Name:	Network_Location_registry-3.png 
Views:	2324 
Size:	41.0 KB 
ID:	20988

    6. Type in a new data value number for the network location you want, and click/tap on OK. (see screenshot below)

    Network Location Data Value
    Public 0 (zero)
    Private 1
    Domain 2

    Name:  Network_Location_registry-4.png
Views: 623408
Size:  10.5 KB

    7. When finished, you can now close Registry Editor if you like.

    8. Sometimes you may need to sign out and in of your user account to apply the new network location.






    Set Network Location to Private or Public in Windows 10 OPTION THREE Set Network Location to Private or Public in Windows 10
    To Change a Network Location Local Security Policy

    Note   Note
    This option will override Option One and Option Two above.


    1. Open the Local Security Policy (secpol.msc).

    2. In the left pane, click/tap on Network List Manager Policies. (see screenshot below)

    Click image for larger version. 

Name:	Network_Location_local_security_policy-1.png 
Views:	2555 
Size:	36.0 KB 
ID:	20982

    3. In the right pane of Network List Manager Policies, double click/tap on your network name (ex: Network). (see screenshot above)
    Note   Note
    You can click/tap on All Networks if you wanted to apply this to all networks on your PC instead of a single network.



    4. Do step 5 (Not configured), step 6 (Private), or step 7 (Public) below for what you would like to do.


     5. To Allow Network Location to be changed by OPTION ONE and OPTION TWO

    NOTE: This is the default setting.

    A) Click/tap on the Network Location tab. (see screenshot below)

    B) Under Location type, select (dot) Not configured.

    C) Under User permissions, select (dot) Not configured.

    D) Click/tap on OK, and go to step 8 below.

    Name:  Network_Location_local_security_policy-4.png
Views: 622616
Size:  17.0 KB


     6. To Change to a Private Network Location

    A) Click/tap on the Network Location tab. (see screenshot below)

    B) Under Location type, select (dot) Private.

    C) Under User permissions, select (dot) User cannot change location.

    D) Click/tap on OK, and go to step 8 below.

    Name:  Network_Location_local_security_policy-3.png
Views: 621974
Size:  17.0 KB


     7. To Change to a Public Network Location

    A) Click/tap on the Network Location tab. (see screenshot below)

    B) Under Location type, select (dot) Public.

    C) Under User permissions, select (dot) User cannot change location.

    D) Click/tap on OK, and go to step 8 below.

    Name:  Network_Location_local_security_policy-4.png
Views: 622616
Size:  17.0 KB

    8. You can now close Local Security Policy if you like.






    Set Network Location to Private or Public in Windows 10 OPTION FOUR Set Network Location to Private or Public in Windows 10
    To Change a Network Location in PowerShell

    Note   Note
    Thank you to our member sm156 for pointing out this option.


    1. Open an elevated Windows PowerShell.

    2. Do step 3 (see current location), step 4 (Private), or step 5 (Public) below for what you would like to do.


     3. To See your Current Network Location

    A) Copy and paste the command below into the elevated PowerShell, and press Enter. (see screenshot below)

    Get-NetConnectionProfile

    B) Make note of the name of your network. For example: Brink-Router3

    C) Go to step 4 (Private) or step 5 (Public) below for what you would like to set your network location as.

    Click image for larger version. 

Name:	network_location_PowerShell-1.png 
Views:	1770 
Size:	38.5 KB 
ID:	34862


     4. To Set Network Location to Private

    A) Type the command below into the elevated PowerShell, press Enter, and go to step 6 below. (see screenshot below)

    Set-NetConnectionProfile -Name "Brink-Router3" -NetworkCategory Private

    Note   Note
    Substitute Brink-Router3 in the command above with your network name from step 3 above instead.


    Click image for larger version. 

Name:	network_location_PowerShell-3.png 
Views:	878 
Size:	26.6 KB 
ID:	34864


     5. To Set Network Location to Public

    A) Type the command below into the elevated PowerShell, press Enter, and go to step 6 below. (see screenshot below)

    Set-NetConnectionProfile -Name "Brink-Router3" -NetworkCategory Public

    Note   Note
    Substitute Brink-Router3 in the command above with your network name from step 3 above instead.


    Click image for larger version. 

Name:	network_location_PowerShell-2.png 
Views:	691 
Size:	26.7 KB 
ID:	34863


    6. When finished, you can now close PowerShell if you like.






    Set Network Location to Private or Public in Windows 10 OPTION FIVE Set Network Location to Private or Public in Windows 10
    To Change Network Location of Current Network Connection in PowerShell

    1. Open an elevated Windows PowerShell.

    2. Do step 3 (Private) or step 4 (Public) below for what you would like to set the network location of your current network connection.


     3. To Set Network Location of Current Network Connection to Private

    A) Type the command below into the elevated PowerShell, press Enter, and go to step 5 below. (see screenshot below)

    $net = get-netconnectionprofile;Set-NetConnectionProfile -Name $net.Name -NetworkCategory Private

    Click image for larger version. 

Name:	Private.png 
Views:	555 
Size:	18.8 KB 
ID:	77550


     4. To Set Network Location of Current Network Connection to Public

    A) Type the command below into the elevated PowerShell, press Enter, and go to step 5 below. (see screenshot below)

    $net = get-netconnectionprofile;Set-NetConnectionProfile -Name $net.Name -NetworkCategory Public

    Click image for larger version. 

Name:	Public.png 
Views:	427 
Size:	18.5 KB 
ID:	77551


    5. When finished, you can now close PowerShell if you like.






    Set Network Location to Private or Public in Windows 10 OPTION SIX Set Network Location to Private or Public in Windows 10
    To Change Network Location of Current Network Connection using a VBS file

    1. Do step 2 (Private) or step 3 (Public) below for what you would like to set the network location of your current network connection.


     2. To Set Network Location of Current Network Connection to Private

    A) Click/tap on the Download button below to download the file below, and go to step 4 below.

    Set_Current_Network_Location_to_Private.vbs

    download


     3. To Set Network Location of Current Network Connection to Public

    A) Click/tap on the Download button below to download the file below, and go to step 4 below.

    Set_Current_Network_Location_to_Public.vbs

    download


    4. Save the .vbs file to your desktop.

    5. Run the .vbs file.

    6. Unblock the .vbs file. (see screenshot below)

    Name:  Unblock.png
Views: 93844
Size:  19.4 KB

    7. Click/tap on Yes or OK when prompted by UAC.

    8. The network location of your current network connect will now be changed.



    That's it,
    Shawn



  1. Posts : 441
    Microsoft Windows 10 Pro 32-bit 10586
       30 Aug 2015 #1

    Hi Brink great job I have one more way of changing the network location so if you ever get the time to add an option 4 here it is, Feel free to delete this post if you do.

    Option 4 To Change Network Location in Settings in Powershell

    open Powershell as an administrator

    Name:  open powershell admin.PNG
Views: 612074
Size:  28.0 KB

    Enter this command
    Code:
    Get-NetConnectionProfile
    Click image for larger version. 

Name:	Command Get-NetConnectionProfile.PNG 
Views:	1084 
Size:	32.0 KB 
ID:	34851

    Find the interface you would like to change, In my case it is Ethernet-2.
    Note: Originally my interface was called " Ethernet 2 " Powershell would not accept the following commands with a space so I renamed the interface to " Ethernet-2 " .

    To change the interface type or copy paste the following command

    Code:
    Set-NetConnectionProfile -InterfaceAlias Ethernet-2 -NetworkCategory Private
    Or to set it to Public

    Code:
    Set-NetConnectionProfile -InterfaceAlias Ethernet-2 -NetworkCategory Public
    Click image for larger version. 

Name:	Command Set-NetConnectionProfile -InterfaceAlias Ethernet-2 -NetworkCategory Private.PNG 
Views:	931 
Size:	38.6 KB 
ID:	34854

    Note you can also change the interface by using other names
    Code:
    Name             : XXXXX
    InterfaceAlias   : Wi-Fi
    InterfaceIndex   : 8
    NetworkCategory  : Public
    IPv4Connectivity : Internet
    IPv6Connectivity : NoTraffic
    Name             : Unidentified
    InterfaceAlias   : Ethernet 2
    InterfaceIndex   : 14
    NetworkCategory  : Public
    IPv4Connectivity : NoTraffic
    IPv6Connectivity : NoTraffic
    
    Set-NetConnectionProfile -InterfaceIndex 14 -NetworkCategory Private
    Set-NetConnectionProfile -IPv4Connectivity NoTraffic -NetworkCategory Private
     and so on.
    No matter what I do the changes are not persistent after a reboot no matter what method I have tried in your tutorial I think it has something to do with " Network location Awareness " I think I will have to make a automated task in task scheduler to make it persistant.

    Before and after picks of Network and sharing center
    Click image for larger version. 

Name:	Network and sharing center the way it is.PNG 
Views:	949 
Size:	36.6 KB 
ID:	34856

    Click image for larger version. 

Name:	Network sharing center the way I want it to be.PNG 
Views:	5374 
Size:	49.4 KB 
ID:	34857
      My ComputerSystem Spec


  2. Posts : 20,683
    64-bit Windows 10 Pro build 16199
    Thread Starter
       30 Aug 2015 #2

    Thank you sml156. I added this as OPTION FOUR.

    I'm not sure why your setting is not persistent. It's stays set for me after a restart.

    Do you have network discovery turned on?
      My ComputersSystem Spec


  3. Posts : 441
    Microsoft Windows 10 Pro 32-bit 10586
       31 Aug 2015 #3

    Thanks one thing about Option 4 in my case anyway was that PowerShell would return an error when my network card name had a space in it, Originally it was called "Ethernet 2" and the only way it would change state was to rename it "Ethernet-2"

    Something weird is going on with this Win 10 home edition I didn't notice until today that whenever I turn on Network discovery and press save then close Network sharing center and then reopen it my settings have changed back to turn off network sharing. I did want to try to figure it out but I'm tired of searching and the home edition does not have gpedit or secpol which is aggravating even when I don't have a problem and I do have a key for Windows ten Pro but I have been procrastinating and not installed it yet but I think I will do that this weekend.

    I have an unusual setup for internet in my garage , I use a USB Wifi to get a signal from my house that is about 50 feet and two brick walls away. Right now the ports look like Hubbard's cupboards because I disconnected a couple of computers


    This is what it looked like while I was trying to figure out the problem before giving up


    Name:  My Network Diagram.PNG
Views: 95905
Size:  29.5 KB
      My ComputerSystem Spec


  4. Posts : 5
    Windows 10 Enterprise x64
       18 Nov 2015 #4

    Hi Brink,

    You were always a huge help on the Seven site.... so I am hoping you can be "Yoda" here too :-)

    I have a domain at home with desktops running W10 Enterprise. Clean installs. The Network location on each shows the domain (with the domain name). When the computers were set up, it took a couple of hours, but each machine was able to browse the network and see every other computer regardless of OS (7, 10, 2008r2 or 2012r2). The DC runs 2012r2.

    This week I started upgrading to the, November, Threshold 2 update (build 10586). I used DVD's and just upgraded the OS on each machine, leaving all files in place (never did get the update offered through WU). Worked almost 100% perfectly (leaving each machine attached to the domain, etc.) However, on each machine that I updated, browsing the network is now limited to seeing ONLY the two W7 machines left on the LAN. I have tried the suggestions in this article, but my locations already show the domain, so I didn't need to change location.... There are no group policies...

    Do you have any idea what the update might have changed or defaulted on these desktops? I am not sure how to get started fixing this. Whatever did change, probably was something that didn't work in previous builds or didn't exist, I guess. I also find it odd that they still see the W7 Pro X64 desktops.

    Any advice would be appreciated.

    Thanks.

    Charlie
      My ComputerSystem Spec


  5. Posts : 20,683
    64-bit Windows 10 Pro build 16199
    Thread Starter
       18 Nov 2015 #5

    Hello Charlie, and welcome to Ten Forums.

    I wish I could help, but I have no experience with domains for this. Please go ahead and create a new thread in the Network and Sharing forum area to see if someone may be able to help soon.
      My ComputersSystem Spec


  6. Posts : 5
    Windows 10 Enterprise x64
       18 Nov 2015 #6

    will do
      My ComputerSystem Spec


  7. Posts : 43
    Windows 10 Enterprise x64
       05 Dec 2015 #7

    "Find devices and content" in #8 and #9 now reads "Make this PC discoverable" in Win10 TH2. MS just wants to keep you on your toes.
      My ComputerSystem Spec


  8. Posts : 20,683
    64-bit Windows 10 Pro build 16199
    Thread Starter
       05 Dec 2015 #8

    Thank you rseiler. MS sure does. The tutorial has been updated now.
      My ComputersSystem Spec

  9.    04 Jan 2016 #9

    Hi, I can change it when I have Administrator rights. How about changing it by a user? Am I missing something? Build 10240
      My ComputerSystem Spec


 
Page 1 of 11 123 ... LastLast

Related Threads
Network defaults to public in Network and Sharing
I have noticed in the last couple of builds the network defaults to public instead of private. I can see that on a tablet but not on a desktop. It is not hard to change the network to private but I wonder how the upgrade will behave on the millions...
Solved Private or Public in Network and Sharing
I just noticed in Windows defender My network is listed as public. Does it matter if my network is listed as private or public. I found how to change it if I have to. I just want to know if it matters. I don't know if this has anything to do with it...
I have noticed something I think is a little strange. If you install one of the later builds from offline, or where a Microsoft account is not involved, it appears your Local Network will be designated as "Public" even though the correct IP address...
Does anyone know how to change the network from Public to Private in build 9926? It's defaulting to Public with network discovery turned off, etc, and I'd like to change it to Private.
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 14:35.
Find Us