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

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)


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

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