5

How to create a new 'Windows Location' setting when there is none set?

For some time now my Win10 Pro system has been running with a perfectly good ethernet stack, but without a 'network location' set, which means some services don't work right (or at all) because Windows is essentially running in 'Public' mode and it disables them.

I have already tried multiple rounds of disabling/deleting drivers, resetting or deleting registry entries and more. I recently came across this post which had some new info. So I now know that:

in an Elevated PowerShell, Get-NetConnectionProfile returns nothing - no entries at all. Using ipconfig in the same window returns the expected info:

PS C:\WINDOWS\system32> ipconfig

Windows IP Configuration
Ethernet adapter Ethernet:
   Connection-specific DNS Suffix  . : ivimey.org
   IPv4 Address. . . . . . . . . . . : 192.168.43.14
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.43.1

So I tried using Set-NetConnectionProfile:

PS C:\WINDOWS\system32> Set-NetConnectionProfile -InterfaceAlias Ethernet -NetworkCategory Private
Set-NetConnectionProfile : No MSFT_NetConnectionProfile objects found with property 'InterfaceAlias' equal to 'Ethernet'.  Verify the value of the property and retry.
At line:1 char:1
+ Set-NetConnectionProfile -InterfaceAlias Ethernet -NetworkCategory Pr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Ethernet:String) [Set-NetConnectionProfile], CimJobException
    + FullyQualifiedErrorId : CmdletizationQuery_NotFound_InterfaceAlias,Set-NetConnectionProfile

I have also tried using -Name rather than -InterfaceAlias with the same result.

Any ideas?

2
  • 1
    did you ever figure this out? you have the exact same issue I'm trying to solve!
    – A G
    Aug 16, 2020 at 21:46
  • 1
    no, sadly. It took reinstalling windows (partly because of move to ssd) to get it fixed.
    – rivimey
    Aug 18, 2020 at 0:06

0

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.