56

My laptop has Wi-Fi and Ethernet (when docked). For some reason Wi-Fi comes up as Private network, and docked comes up as Public. In neither case did I set either as Private or Public.

Where do I set this on Windows 10? It seems like I am missing something here...

7 Answers 7

42

I think that the easiest method to change your network to Private is through the Registry Editor:

  1. Do a search for regedit, then right-click and Run as administrator
  2. If necessary, acknowledge the UAC prompt
  3. Navigate to the following location:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles

    Profiles

  4. Expand the Profiles key and navigate through each GUID key below that, noting the corresponding ProfileName on the right:

    ProfileName

  5. When you find the ProfileName of the network you want to change to Private, double-click on the Category DWORD on the right-hand side:

    Category

  6. Change the ‘Value data’ from 0 (Public) to 1 (Private):

    DWORD

  7. Close the Registry Editor

  8. Reboot

(Source: How to Set Network Location to be Public or Private in Windows 10)

12
  • 30
    Next time I hear how MS-Windows is so pointy and clicky, with so many helpful buttons and wizards, eager to help you in any way; and how much of a dinosaur are all those obsolete command and shell-based operating systems, like Linux, are -- and how even the simplest things require arcane knowledge of shell scripting and magic incantations, I'm going to refer to this bookmarked question... Commented Dec 27, 2016 at 4:10
  • 4
    @SamVarshavchik Eh... the "Make this PC discoverable" option exists. It's not like either OS really forces you to use a GUI or various CLI(-like) methods; both are options.
    – Bob
    Commented Dec 27, 2016 at 7:58
  • 2
    Hacking the registry since 1992...
    – jpmc26
    Commented Dec 27, 2016 at 9:24
  • 3
    @SamVarshavchik Wasn't this configurable from the GUI in W7?
    – MBender
    Commented Dec 27, 2016 at 13:22
  • 2
    This answer should show the GUI version as well. Running regedit seems unusually complicated.
    – Jim B
    Commented Dec 27, 2016 at 13:55
39

The following small PowerShell script can do the same (it also requires administrator privileges).

It will list all non-private profiles and ask for confirmation to change them to private.

## Change NetWorkConnection Category to Private
#Requires -RunasAdministrator

Get-NetConnectionProfile |
  Where{ $_.NetWorkCategory -ne 'Private'} |
  ForEach {
    $_
    $_|Set-NetConnectionProfile -NetWorkCategory Private -Confirm
  }

Sample output on my German locale system:

Name             : Netzwerk
InterfaceAlias   : Ethernet
InterfaceIndex   : 3
NetworkCategory  : Public
IPv4Connectivity : Internet
IPv6Connectivity : Internet

Bestätigung
Möchten Sie diese Aktion wirklich ausführen?
[J] Ja  [A] Ja, alle  [N] Nein  [K] Nein, keine  [H] Anhalten  [?] Hilfe (Standard ist "J"): K

Edit This is the English confirmation text:

Confirm
Are you sure you want to perform this action?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): n
3
  • @InquisitorShm Thanks for the headsup, just appended the English confirmation text.
    – LotPings
    Commented Dec 29, 2016 at 18:29
  • This was great! I couldn't use regedit to find my "unidentified network" that was created by Hyper-V. Commented Dec 21, 2017 at 20:16
  • This will make every saved network private. I've already set the key to private for this network but all my networks are enumerated as "network", "network 1" etc which bear no resemblance to my SSID. So you win.
    – John
    Commented Jul 30, 2018 at 12:59
21

You could use a Powershell command to perform this:

  1. WIN+R
  2. Type powershell.exe and hit Ctrl+Shift+Enter (Opens as Administrator)
  3. Paste in the following command (replacing Network_Name with the chosen network)

Set-NetConnectionProfile -Name "Network_Name" -NetworkCategory Private
4
  • 2
    Can you explain what this is doing? It looks to me like it's setting Everything to private which would be the same as 'Home' I believe? Commented May 15, 2017 at 10:17
  • Sorry I typed <Network Name> and it was removed for some reason. Updated answer. Commented May 16, 2017 at 4:58
  • 1
    You must run it as administrator. and Thanks
    – ebrahim.mr
    Commented May 20, 2019 at 9:24
  • 1
    This is a nicer option than using regedit, and has the bonus of working with unidentified networks (which Settings app and regedit don't seem to support). Although, I had to run PowerShell as Administrator to get it to work (press Ctrl-Shift-Enter instead of just Enter).
    – emorris
    Commented Apr 20, 2020 at 10:40
11

If you're not already on a private network, this is the quickest and easiest way:

  1. Open a File Explorer window.
  2. Click Network in the left-hand navigation pane.
  3. Click OK to the error message.
  4. Click the yellow infobar and then Turn on network discovery and file sharing.
  5. Click No, make the network I am connected to a private network.

Alternatively, you can use PowerShell:

  1. Run PowerShell as administrator.
  2. Type this command to make all connections private:
    Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory Private

If you have multiple connections and you'd like some not to be private, you can set them selectively:

  1. Get current networks:
PS C:\> Get-NetConnectionProfile

Name             : Network
InterfaceAlias   : Ethernet 1
InterfaceIndex   : 11
NetworkCategory  : Public
IPv4Connectivity : LocalNetwork
IPv6Connectivity : LocalNetwork

Name             : Unidentified network
InterfaceAlias   : Ethernet 2
InterfaceIndex   : 4
NetworkCategory  : Public
IPv4Connectivity : LocalNetwork
IPv6Connectivity : LocalNetwork
  1. Change the desired network:
Set-NetConnectionProfile -InterfaceAlias "Ethernet 1" -NetworkCategory Private

Note that you can never manually change a connection profile to the network category DomainAuthenticated. If you have an interface that should be set to this but isn't, you have a bigger domain connectivity issue at play.

4
  • 1
    Wow, easily the best answer. Took 5 seconds, no scary commands or registry changes. Commented Nov 13, 2020 at 18:58
  • Get-NetConnectionProfile does not show me disconnected networks that I can find at registry key: "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles", so this code only works for the connected networks Commented Aug 10, 2022 at 0:02
  • The commands for making a specific adapter private are great - much better than wholesale marking unidentified connections private as in other answers (*shudder*).
    – Paul
    Commented Apr 2, 2023 at 8:46
  • So elegant, thank you! Should be the accepted answer.
    – Basic
    Commented Aug 24, 2023 at 2:21
3

In Windows 8/8.1 Microsoft moved those settings to the new settings app. I personally don't like it. These instructions are for wired Ethernet connections. I can't find a setting for individual Wi-Fi networks.

In Windows 10, the same settings app has the setting you need to point and click to make it a public or private network.

  1. Click on the start button and type settings and open up the Settings App.
  2. Select Network & Internet
  3. Select Ethernet
  4. Select the adapter you want to change the setting for.
  5. Make this PC discoverable should be set to On for private networking.

Steps to accomplish this

1
  • 4
    A very good tutorial, but there are a pair of very important caveats regarding this method: Make this PC discoverable settings will not be available if you have UAC set to Always notify. Also, Make this PC discoverable settings will not be available if you have a Hyper-V virtual switch configured with that Ethernet connection.
    – Run5k
    Commented Dec 29, 2016 at 23:23
2

Figured I'd chime in as well. My connection inadvertently was changed to Public, and when I would click the Private radio button in Windows' Network Settings, it would appear that the change was successful. However, exiting out and going back into the adapter settings I find that the change didn't save and was set back to Public.

I've tried using Powershell and even a network reset, but I just couldn't get it to work.

I was able to resolve this issue by going into my Firewall settings (I use a third party firewall) and I was able to change it there.

Please enjoy my freehand circle

enter image description here

I'm sure it's probably a bug in the firewall's software that locks down the changes out of it's UI, but regardless it works and hopefully does for the next person to wander here.

1
  • Thanks a lot for posting this, was having the same issue. You saved the day man.
    – zing
    Commented Jul 27, 2020 at 8:40
2

I have had the same problem (missing options) and all mentioned solutions did not work:

  • Registry did already show Private/1 for the connection
  • PowerShell command would change settings, but they would be lost on WiFi reconnect/restart
  • Removal of connection, hiding and then searching again did not work
  • No 3rd party firewall used, but disabling Windows Defender did not change anything

The solution in my case was to have a working Internet connection. While the device was connected to a singular (offline) WiFi Access Point (with either DHCP or static assignment), the problem persisted.

When connecting the AP to the wider network and to a gateway to the Internet, the options in the settings dialogue instantly appeared and could be set as expected.

1
  • 1
    Thanks for confirming my issue. But this is annoying. Why is it only available with an internet connection? I have a situation where I don't want/need internet on a network, and I keep having to constantly tell the computers on the network to treat the network as private.
    – Moss
    Commented Oct 5, 2022 at 6:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .