Set Network Location to Private, Public, or Domain in Windows 10  

Page 5 of 12 FirstFirst ... 34567 ... LastLast

  1. Posts : 68,840
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #40

    Odd. It looks like you may have to use one of the other options instead for now.
      My Computers


  2. Posts : 42
    Windows 7, 8.1, 10
       #41

    I would note that to go to the last setting in UAC, you have to reboot for it to take effect.

    An hypothesis:
    If the discovery slide switch doesn't appear at the 3rd level of UAC then:
    Go to the lowest level and reboot.
    Then confirm that the slide switch appears.
    Then move up one level to the 3rd level and try again (apparently no need for a reboot here).
    Then move up to the 2nd level and try again (also no need for a reboot).
    Of course, you could skip the middle step at level 3 but I was curious.

    It's not a very "logical" thing to try. But then with all their logic, how often do we see computers behavior be illogical? Often enough.
    Example: to get a setting to work when it's already set: unset it and then reset it. Actual cause is likely an errant bit.
      My Computer


  3. Posts : 232
    Win 10 Ver 1903
       #42

    I have been a Fly on the Wall since i started this thread but I have noticed that most of the other people posting have another problem i have seen as well. On some systems it is nearly impossible to get all those "default option displays" to show up. If they are not there, you cannot do it. I also have not seen any specific reason for this to happen and have even seen it act one way sometimes and on other occasions it seems they are all there.
    I have even seen it NOT be there one minute and I swear when i go out and come back then it IS there. Just last night, i ran into a similar issue with the desktop background. I had a solid color. I experimented with using a picture, then tried to go back to a solid color.

    Unfortunately, when i picked solid color.. i was not given any colors to chose from, If i chose to manually select the "accent colors" I got the usual layout pallet to pick from and these did change when chosen. But the desktop background was stuck on the picture. It refused to go back to a color. In desperation, i chose Hi Def and of course THAT worked but who wants a fluorescent green screen!

    After much searching i found this command >'C:\Windows\System32\control.exe /name Microsoft.Personalization /page pageWallpaper'
    This worked. I added that to a desktop shortcut so i wont get stuck with photos again but it was still an odd thing to need it.
      My Computer


  4. Posts : 232
    Win 10 Ver 1903
       #43

    Thanks for all the great info. I wish there was an "already been done" script to take the information obtained fromthe first scan and use it to display options to a user that would show them the cvurrent settings on each wifi profile and allow them to choose from a list of options (0,1,2 etc) and after they choose the one they want it would change the current value for the selected wireless profile to match the desired profile type.

    While the Start>Settings> etc method in Windows 10 does work (when it displays as it should) it is difficult to explain to most people and they invariably end up clicking "NO" when asked "Do you want other devices on the network to be able to see you.." which of course puts them right back to PUBLIC again. I have searched everywhere for a way to "do it all for them" in a PowerShell script even if it meant forcing every profile to be Private but a properly written utility that would display their options and allow them to choose would of course be best.
    As a matter of interest, one person suggested
    Code:
    $net = get-netconnectionprofile;Set-NetConnectionProfile -Name $net.Name -NetworkCategory Private
    But when I tried this on my own system that I had deliberately set to public as a test, it did nothing. Is this one of those "Windows 10 <things>" where normal scripts just wont cut it?
      My Computer


  5. Posts : 68,840
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #44

    Hello Questorfla, :)

    It should work. I added OPTION FIVE to help with this. Be sure that you ran the command in an elevated PowerShell.

    For a script, you could do so with a .bat file with the command like below in it, then right click on the .bat file, and click on "Run as administrator".

    Code:
    PowerShell $net = get-netconnectionprofile;Set-NetConnectionProfile -Name $net.Name -NetworkCategory Private

    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. :)
      My Computers


  6. Posts : 68,840
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #45

    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. :)
      My Computers


  7. Posts : 232
    Win 10 Ver 1903
       #46

    Brink said:
    Hello Questorfla, [IMG]file:///C:/Users/mg/AppData/Local/Temp/msohtmlclip1/01/clip_image001.png[/IMG]

    It should work. I added OPTION FIVE to help with this. Be sure that you ran the command in an elevated PowerShell.

    For a script, you could do so with a .bat file with the command like below in it, then right click on the .bat file, and click on "Run as administrator".

    Code:
    PowerShell $net = get-netconnectionprofile;Set-NetConnectionProfile -Name $net.Name -NetworkCategory Private

    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. [IMG]file:///C:/Users/mg/AppData/Local/Temp/msohtmlclip1/01/clip_image001.png[/IMG]
    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
    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
    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.
      My Computer


  8. Posts : 68,840
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #47

    Either "Brink" or "Shawn" is fine. :)

    If you like, how would the .vbs files in OPTION SIX work for you?
      My Computers


  9. Posts : 232
    Win 10 Ver 1903
       #48

    I can't see an option Six?
    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!
      My Computer


  10. Posts : 68,840
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #49

    It's on the fist page towards the bottom of the tutorial. Here's a direct link below to OPTION SIX to help. :)

    https://www.tenforums.com/tutorials/6...a.html#option6
      My Computers


 

Tutorial Categories

Set Network Location to Private, Public, or Domain in Windows 10 Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 12:08.
Find Us




Windows 10 Forums