How do I force Windows 10 to see a network as private?

31

21

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...

Inquisitor Shm

Posted 2016-12-26T19:27:28.583

Reputation: 818

Answers

25

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)

Run5k

Posted 2016-12-26T19:27:28.583

Reputation: 13 092

Always glad to help! – Run5k – 2016-12-26T20:19:56.247

14Next 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... – Sam Varshavchik – 2016-12-27T04:10:23.193

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 – 2016-12-27T07:58:45.587

2Hacking the registry since 1992... – jpmc26 – 2016-12-27T09:24:14.820

3@SamVarshavchik Wasn't this configurable from the GUI in W7? – Shaamaan – 2016-12-27T13:22:06.477

@Bob , that is a good point about the "Make this PC discoverable" option. However, many of the people that I know are utilizing a Hyper-V virtual switch and/or have their UAC set to Always notify. As a result, that seems to add unnecessary layers of complexity to that option. That's why I usually teach the Registry Editor method... it stands on its own merits. – Run5k – 2016-12-27T13:42:58.600

2This answer should show the GUI version as well. Running regedit seems unusually complicated. – Jim B – 2016-12-27T13:55:27.233

1@SamVarshavchik Who says that? Ubuntu is essentially just MacOS minus some peculiar software. I certainly don't see anybody saying MacOS is non user-friendly. – xji – 2017-01-08T15:26:39.443

Please read [How to reference material written by others](https://superuser.com/help/referencing" class="soup-https-fixed). You should block quote text that has been written by some else. See Markdown help. I've fixed it for you this time, but please pay attention to this in future.

– DavidPostill – 2017-01-22T14:53:16.617

@DavidPostill , absolutely… I am always ready & willing to cite my original source. Occasionally, I make judgment calls if I feel that I paraphrased and customized the source narrative to the point that it should be a simple hyperlink reference, rather than a block quote. This was one of those scenarios, and my apologies if the consensus feels that I should have gone the other way. – Run5k – 2017-01-22T15:10:29.577

I found the right profile, the only public one that had a creation date smaller than the date of last use. After restarting it becomes a private network but, Windows will soon go back to treating it as public one (eg "enable print and file sharing on all public networks?") – John – 2018-07-30T13:51:53.620

25

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

LotPings

Posted 2016-12-26T19:27:28.583

Reputation: 6 150

@InquisitorShm Thanks for the headsup, just appended the English confirmation text. – LotPings – 2016-12-29T18:29:09.300

This was great! I couldn't use regedit to find my "unidentified network" that was created by Hyper-V. – Holistic Developer – 2017-12-21T20:16:57.030

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 – 2018-07-30T12:59:54.950

7

You could use a Powershell command to perform this:

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

Set-NetConnectionProfile -Name "Network_Name" -NetworkCategory Private

Aditya Prasoon

Posted 2016-12-26T19:27:28.583

Reputation: 81

2Can 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? – djsmiley2k TMW – 2017-05-15T10:17:47.410

Sorry I typed <Network Name> and it was removed for some reason. Updated answer. – Aditya Prasoon – 2017-05-16T04:58:32.980

1You must run it as administrator. and Thanks – ebrahim.mr – 2019-05-20T09:24:38.453

1

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

wbeard52

Posted 2016-12-26T19:27:28.583

Reputation: 3 149

2A 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 – 2016-12-29T23:23:39.710