This message was deleted.
# _general
s
This message was deleted.
👀 1
d
Don't have this issue with Windows 10, but I don't really use Windows 10 either. But for our servers 2012R2 - 2019 when it happens usually just a restart of the Network Location Awareness Service will fix it. I did also do some registry changes that made things slightly better: SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet ActiveDnsProbeHost REG_SZ dns.msftncsi.com MinimumInternetHopCount REG_DWORD 0x1 I have our monitoring system run a PowerShell script that checks the status and restarts if needed (check runs once per hour)(The Get-NetConnectionProfile command is not available on 2012R2, so I have a different IF statement for those):
Do
{
$Pass += 1
If((Get-NetConnectionProfile).IPv4Connectivity -contains "Internet")
{
$return = 1
}
if ($return -eq 0)
{
Restart-Service "NlaSvc" -Force -WarningAction SilentlyContinue
Start-Service "netprofm"
Start-Sleep -Seconds 5
}
} Until ($return -eq 1 -or $Pass -gt 1)
a
oh awesome that was my next question on ideas to proactively monitor it. i think i could probably use a scheduled pdq powershell script and any that result in certain return codes run that restart. we've been restarting the desktop but would be great to only have to restart a service. qwe run a desktop restart every saturday night and tend to only get calls on monday mornings so wondering if this is based off of a few hundred restarts (stagered) at once trying to run that check or something
i seem to have an issue restarting the Network Location awareness service now for some reason (powershell and via the services management). is there some trick to that?
d
Just tried it on my Windows 10 workstation and it won't stop for me either, because the Network List Service won't die. Have not had that issue on any server OS up to 2019, we aren't running 2022 yet.
a
damn maybe this wont wok on Win 10 then. so your PS command to determine the status is at least helpful to start as i can get a heads up maybe who/how many are having the issue. i just need a full restart right now all. you said adding the MinimumInternetHopCount help cut down the instances though?
d
It did when I first started trying to figure it out. It's so annoying that really the only thing that breaks is Outlook, which happens to be about the most import thing for most users. I'd prefer to just disable the whole thing.
a
no kidding! did you have to enable passive probing for that key to do anything or no? we just have the defaults w/ win 10 set so far w/ that service
d
If I remember correctly, it's been a couple years since doing all this...Passive probing made things worse. I did also put in Group Policy Preference - Service to set the NlaSvc to Automatic - Delayed Start. This helped a lot as well, because it would do the check before the network stack was fully available.
a
ahh i see what you mean. thats a good idea so thinking there is the checks would run before everything was ready and giving false positives
d
Yep.
a
makes sense! we're that we only see it w/ the bulk restarts and not during the week when people reboot on their own but maybe just too many similar actions going out at once
d
Saw a lot of that too during patch windows when lots of servers restarted at around the same time.
a
cool that helps to know others saw similar patterns. helps me know that our settings are mostly fine and just too much of a flood. do you mind sharing a screenshot of one of your systems registry for that Internet key (if its nothing sensitive urls's / IPs)? just curious to match mine as i tinker
d
Now makes me wonder if Microsoft throttles the traffic.
a
like too many requests from one IP or something
awesome thanks for your help!
d
Yep. No worries.
a
probably no way to trigger that "recheck" w/our restarting that service i'd imagine too hey?
d
Sorry for the slow response, I was off for my weekend... I hadn't found any other way, but thinking about it again now there is another way, but it is potentially disruptive.
Restart-NetAdapter -Name *
There may be other ways I have not found.
I found this will kill the Network List Service, which actually seems to be enough to force a new check. Run in PowerShell as admin with the PSTools installed which may not be what you want...
C:\pstools\psexec -s -accepteula c:\pstools\pskill $((Get-WmiObject Win32_Service | Where-Object { $_.Name -eq "Netprofm" }).ProcessId) -accepteula
a
Awesome thanks! I'll have to test to see what it does with an active session/logged on user
👍 1
d
I had tried to restart the service cleanly, but it won't restart on my Win10 computer. So, that's not much help...but thought you might want that info as well.
C:\pstools\psexec -s -accepteula c:\pstools\psservice restart netprofm -accepteula
a
Good to know thank you! So the pskill method just force kills it and did it start right back up?
d
Correct, it forces kills the process and it restarts immediately. It may not restart every time if done "too quickly" though...depending on what too quickly means. However, I force killed the service more than 3 times today and it did always restart, so it may just always restart itself...
You can also tell if it's Internet connected via the Microsoft -> Windows -> NetworkProfile event logs. And see there when it does the refresh after restarting/killing etc.
a
Awesome thank you for the help on this! I so far changed the other service to delayed start but still had any 60 of the 400ish that rebooted last night come up with no internet so I had to reboot those.
d
That's so annoying!
a
yup cant figure out what it is since it does work when you reboot them the next time
i found i can do the same command w/ PS instead of pstools (since we can send remote PS commands w/ a couple of our management tools. it does seem to restart the network list service so i'm just waiting for a desktop to show no internet to test. on my own desktop it didnt seem to do anything to my active connection so thats great so thank you! now to just figure out WHY its happening
taskkill /IM $((Get-WmiObject Win32_Service | Where-Object { $_.Name -eq "Netprofm" }).ProcessId) /F
👍 1
unfortunately even doing that doesn't seem to fix the no internet. only a reboot seems to do the trick. has anyone found any verbose logging or other troubleshooting methods to narrow things down when this happens?