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

Discus and support Set Network Location to Private or Public in Windows 10 in Windows 10 Tutorials to solve the problem; Ok @questorfla. OPTION SIX has been added to the tutorial to easily set the network location of the current network connection with a .vbs file. *Smile Discussion in 'Windows 10 Tutorials' started by sml156, Aug 30, 2015.

  1. Brink
    Brink New Member

    Set Network Location to Private or Public in Windows 10


    Ok @questorfla. OPTION SIX has been added to the tutorial to easily set the network location of the current network connection with a .vbs file. *Smile
     
    Brink, Apr 29, 2016
    #46

  2. I'll work on a .vbs script now that will do the elevation and run the command all in one to make it easier, and will add it to the tutorial shortly to help. Set Network Location to Private or Public in Windows 10 [​IMG][/quote] Thanks: I haven't been a member of Ten Forums long enough to know if your prefer "Brink" or "Shawn" because I see both names used interchangeably.
    I may be able to help with the Batch script as I worked that out last night

    Code: @ECHO OFF PowerShell.exe -NoProfile -Command "& {Start-Process PowerShell.exe -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File ""%~dpn0.ps1""' -Verb RunAs}" pause[/quote] If this code is in the same folder as the ps1 code and has the same name, you just run the Bat file with normal level priveledges, no elevation needed.
    It works and I would like to wrap this up into a nice utility which would show the user the name of the active profile, as well as its status, then take that name and use it in the next line asking the User to input if it should be set to Private or Public. For my needs, it would always be Private but I went this far so why not make it a choice for either?

    Done like this, it could be run portably from a flash drive or sent as a zip file and would work on anyone's system. At least that is my Working Theory. The full ps1 script I used is something like the below (It isn’t Finished but you can see where it is going)

    Code: $net = get-netconnectionprofile;Set-NetConnectionProfile -Name $net.Name -NetworkCategory Private pause Get-NetConnectionProfile pause $net = get-netconnectionprofile;Set-NetConnectionProfile -Name $net.Name -NetworkCategory Public pause Get-NetConnectionProfile pause $net = get-netconnectionprofile;Set-NetConnectionProfile -Name $net.Name -NetworkCategory Private pause Get-NetConnectionProfile pause[/quote] All the pauses and repetition are there because I am still testing and want to see what each change accomplishes.
    However, this still has no User input to allow anyone to choose the type of Profile they are after.
    I need to add the option to Pick Public or Private and do only the one change requested and display the results.


    I am not sure whether the display for ‘Get-NetConnectionProfile’ is showing only the active profile or if on other systems it might show all profiles on the system. The laptop I am using only has one wireless profile to start with. If it only show the one that is active that was my intent from the start.

    Thanks for the reply and all the help. Both here and on many other things I have learned from your site.
     
    questorfla, Apr 29, 2016
    #47
  3. Brink
    Brink New Member
    Either "" or "Shawn" is fine. *Smile

    If you like, how would the .vbs files in OPTION SIX work for you?
     
    Brink, Apr 29, 2016
    #48
  4. Set Network Location to Private or Public in Windows 10

    I can't see an option Six? *Sad
    Maybe not yet posted or not yet showing up? I tried to refresh view and tried reconnect to site but only see the ones already there.
    Probably my Internet .
    Which page is the Option Six displayed on?
    Thanks again for all the assistance!
     
    questorfla, Apr 29, 2016
    #49
  5. Brink
    Brink New Member
    Brink, Apr 29, 2016
    #50
  6. Sorry Brink.
    I just wasn't looking close enough. I cannot think of any advantage to having a wifi profile set to Public other than it may be needed for a HomeGroup? And the only thing left was to offer them a choice.
    As there are only two options, it would be easiest to simply provide a script for PRIVATE and another for PUBLIC and let this one be "OVER" with *Smile.
    On a side note, the use of the Free version of NetSetMan (which I believe you have offered people before) also is a nifty thing to have. It seems to do everything else other than offer a fix for the "Private vs Public"
     
    questorfla, Apr 29, 2016
    #51
  7. Brink
    Brink New Member
    No problem. Hopefully the different options in the tutorial will give folks a variety to meet their needs. *Smile
     
    Brink, Apr 29, 2016
    #52
  8. PhoebeAnn Win User

    Set Network Location to Private or Public in Windows 10

    I'm running 1511 and have the same problem(s).
     
    PhoebeAnn, Apr 30, 2016
    #53
  9. PhoebeAnn Win User
    This may belong in another thread, possibly another forum; I'll apologize in advance, but if this rings any bells, let me know; in the meantime I'll investigate more widely.

    The reason I've spent the last 20 hours or so trying to make my local network(s?) Private is I'm trying to add 2 PCs to my Homegroup. One is a Windows 7 machine, the other a Windows 10 (1511, 10586.218). Homegroups, as I suppose everyone now knows, only work with Private networks.

    My LAN is fed by a Netgear router providing Gb Ethernet, and 2.4GHz b/g/n, and 5 Ghz a/n wireless connections. All interfaces share the same Class C address space. It looks like Windows is considering those three connections as separate networks -- it will only allow a Homegroup connection to a computer connected to the same interface used by the computer that defined the Homegroup. Specifically, the W7 server that defined the Homegroup is connected via Ethernet; I was able to easily add another Ethernet-connected W7 PC to the Homegroup, but not one connected wirelessly. It did recognize that a Homegroup was available, but when I told it to join, it just sat there. The Homegroup diagnostics and network diagnostics were silent. But when I added a wired connection, the join was completed in a few seconds. Bad wireless link, one might say, but it worked flawlessly to install close to 200 Windows Updates during the day, and worked just now to join the W10 machine, after I used the Registry mod (#1, as I remember) to make the interface Private. Many thanks for that tip and the rest of this thread.
     
    PhoebeAnn, Apr 30, 2016
    #54
  10. Brink
    Brink New Member
    Brink, Apr 30, 2016
    #55
  11. JDA53 Win User
    I just found this forum and I have a question related to this thread:

    I have two desktops (mine and my wife's), one laptop (shared), and a Western Digital MyCloud hard drive connected to my home network. The desktops and the MyCloud are Ethernet wired and the laptop is wireless. All connections go through the Netgear router. I have Norton installed for firewall and anti-virus. I am the one who sets up the computers, so I have been running my desktop as Administrator. Today I was looking at the Network and Sharing Center control panel and I see that I have two active networks as shown below.


    Set Network Location to Private or Public in Windows 10 [​IMG]

    I'm afraid I don't know where this "Unidentified network" came from and I don't know which device it applies to.

    (1) Can you point me in the right direction so I can figure out which device this "Unidentified network" applies to?
    (2) I assume it's not one of the desktops, so is there a risk involved if I just make the network Private?

    Thanks for the great info.
     
    JDA53, May 29, 2016
    #56
  12. Brink
    Brink New Member
    Hello JDA53, and welcome to Ten Forums. *Smile

    If you like, click on the "Change adapter settings" link, and see if the network adapter for "Ethernet 3" is listed. If so, you could disable it to remove the "Unidentified network".
     
    Brink, May 29, 2016
    #57
  13. Set Network Location to Private or Public in Windows 10

    Thanks a lot for the great post. I'm just wondering is it ever possible (for example due to Windows update) for network discovery to turn on or for network locations to change without user permission ?

    Thanks
     
    Zzgooloo10, Sep 16, 2016
    #58
  14. Brink
    Brink New Member
    Hello Zzgooloo10, *Smile

    Usually this setting will not get changed unless you do so, but it wouldn't surprise me if a Windows Update may reset it back to default.
     
    Brink, Sep 16, 2016
    #59
  15. But the original setting is public right? If it has changed to a private network would it be safe to say it was done by someone other than you?
     
    Zzgooloo10, Sep 17, 2016
    #60
Thema:

Set Network Location to Private or Public in Windows 10

Loading...
  1. Set Network Location to Private or Public in Windows 10 - Similar Threads - Set Network Location

  2. Network Settings - Private or Public

    in Windows 10 Gaming
    Network Settings - Private or Public: I currently have two machines, one runs Win11 and the other Win8. Both connect via ethernet cable to a netgear switch which in turn ethernets to the BT Hub - so both are connected to the Internet. I run AVG VPN on both. I recently made both machines discoverable and can...
  3. Network Settings - Private or Public

    in Windows 10 Software and Apps
    Network Settings - Private or Public: I currently have two machines, one runs Win11 and the other Win8. Both connect via ethernet cable to a netgear switch which in turn ethernets to the BT Hub - so both are connected to the Internet. I run AVG VPN on both. I recently made both machines discoverable and can...
  4. public or private network settings

    in Windows 10 Network and Sharing
    public or private network settings: windows 10, network created as private to enable sharing of network devices, but the public network takes over when rebooting, how to make the private settings stay primary? aslo the subnet pickups up the wifi factory address as 192.168.7.1 and locks to 255.255.255.0 no...
  5. Windows 10 treats the private network as a public network.

    in Windows 10 Network and Sharing
    Windows 10 treats the private network as a public network.: Windows blocks all connections on the same subnet. Windows will connect to any computer/server on the other side of the default route/router. This isolated tunneling through the resident subnet would be something I would expect from a public WiFi connection. The windows...
  6. Public or Private Network

    in Windows 10 Network and Sharing
    Public or Private Network: Hello, May I ask: Should a home PC user select (from their network properties) the Public or Private Network Option? I don't want my PC to be viewed or discoverable by any neighbors in the WiFi Network. I will not be file sharing. Just simply want security. Thanks...
  7. Should Network profile be set on Public or Private?

    in Windows 10 Network and Sharing
    Should Network profile be set on Public or Private?: I'm on my home computer, should I have my Network profile set on Public or Private? I do not want any my computer being detected by any network. The explantion of what the settings are, are confusing. Public says, "Your PC is hidden from other devices on the network and...
  8. Private and Public Network Connections

    in Windows 10 Network and Sharing
    Private and Public Network Connections: Hey everyone, just recently I reset my modem and router and my laptop. I have made sure that my home router is secure yet when I connect to it, if I go to settings it sets me as a public network. This is weird because when I got my laptop and connected, the computer...
  9. Setting public to private networks

    in Windows 10 Network and Sharing
    Setting public to private networks: I have a VPN for internet traffic which has a virtual adaptor, that is set to private. But the real adaptor is set to a public network and I want to set it to see other devices, therefore I want to change it to private how do I do this in build 1809? Winver says I have win...
  10. change network location from public to private

    in Windows 10 Network and Sharing
    change network location from public to private: Hi guys I am running a laptop with windows 10 , so how do I change the network profile from public to private . thanks 86368