Windows 10: Set Network Location to Private or Public in Windows 10
If the network names will always be the same, you could create a .bat file using the PowerShell command from OPTION FOUR to do so. You would then use "Run as administrator" on the .bat file when you want to run it.
Here's an example of the command to place in the .bat file.
PowerShell Set-NetConnectionProfile -Name "Brink-Router3" -NetworkCategory Private
Last edited by questorfla; 23 Mar 2016 at 13:26.
I'm afraid that I don't how to do this in PowerShell to be able to help with it, but it'll be worth a try to see if it'll work.
Oh, it works alright, much to my amazement!
Just tested on several users. Now I need a nice interface instead of the normal "blue screen of death look" that PowerShell runs in.
When run, it first asks the user for permission to edit the files as this is normally prevented by the security policies.
If they say Y(yes) it displays the status of all network connections.
WiFi, Wired, VPN etc. From this you pick the reference# for the one that is currently public that you want to be private
type in the number of the Network Interface (6 or 10 etc) that you want to be Private and Viola'!
Anything not desired to be changed is not.
For me, at least, it is a perfect solution for a time consuming and annoying task.
Now if only I could figure out how to get the PHP code in a web-hosted document indexer to open the pdf's server-side instead of downloading them by default each time one is clicked... I am WAY! off the reservation on that one. No idea at all.
If you like, create a new thread in the Network and Sharing to see if someone may be able to further help with the script.
I have one like this that started out Public.
I had to use the PowerShell approach to change it to Private.
The dialogs like these:
are MISSING ENTIRELY.
Yet, in Control Panel \ Network and Sharing Center \ Advanced Sharing settings:
Private (Current profile)
Turn on network discovery IS CHECKED.
So, it works but the expected controls are missing.....
Now I have to wonder why that should / could be?
Double check to see if what's in the note box under step 7 below may be responsible.
Make This PC Discoverable is Missing Entirely
Windows 10 / Settings / Network.... / Ethernet
Double click on network
Shows properties but NOT the "Make This PC Discoverable". That's missing.
The network has been set to Private.
Control Panel Advanced Settings shows that "Turn on network discovery" is CHECKED and it appears to be working.
Did you check to see if what I posted above was the issue?
Yes. The UAC is set to the Default which is supposed to show these things as I understand it. And that's where I found it.
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...
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.