Windows Server 2022 Unable to restart 'Network Location Awareness' Service

Copper Contributor

Testing server 2022 (core) GA on two machines; one physical, one virtual. When I attempt to restart the network location awareness service using the command:

 

 

restart-service -Name NlaSvc -Force

 

 

I receive the below error message:

bradcope_0-1630884320199.png

Narrowing down the error, i run the below command:

 

 

restart-service -Name netprofm -Force

 

 

Which results in the below error:

bradcope_1-1630884579854.png


This is happening on both of our Server 2022 builds, I have had no issue running these commands on 2012/2012 R2/2016/2019, so why can't i run this command on server 2022?

35 Replies

@bradcope Same issue here, and NLS is messing with NIC firewall profile as well: some of my NICs are switched from domain profile to public profile...

Glad I'm not along in this issue. Anyone who uses NIC teaming with LACP needs to occasionally restart the Network Location Awareness service to get the firewall to apply the correct profile

@bradcope , Same for me too. On my server 2022 DC, the "nlasvc" service doesn't even have Active Directory Domain Services as a dependency. And my NIC profile is set to Private. I did try and run "sc config NlaSvc depend=NSI/RpcSs/TcpIP/Dhcp/Eventlog/Netlogon/DNS/NTDS" from an elevated CMD prompt, which succeeded, but I am unable to restart the NLASVC due to an "Error 1601: The service cannot accept control messages at this time."

Any luck figuring this out? I run into the issue w/ restarting NLA often and have no issues doing so in any version of server prior to 2022. I have a clean install ADDC that does this. I have found that disabling IPv6 has been the only solution for me. That or I kill the service PID. I don't want to have to do this every time I reboot this server. I'm using Switch Embedded Teaming
A little trick I'm using right now is just to enable or disable IPv6 and then reverse. I don't use IPv6 so i will check the box to enable and then disable. I am now appearing on the appropriate network.

Thanks
Dave

@Dave Brunner Hi Dave, I managed to fix mine by adding the DNS suffix on my IPV4 adapter. Now my DC boots to Domain Network on every reboot.

IPV4 Properties > General > Advanced > DNS > Register Suffix for this connection (add your domain name e.g. "domain.local").

 

I also set the Network Location Awareness service to "Delayed Start"

Hope the above helps.

@nileshpancholi 

 

Thank you for that.  I did add that to my biggest problem child 2022 server and it seems to have worked.  Going to try that on a few more servers and see if it resolves it.  I appreciate you taking the time to mention this.  Shocking MS doesn't have any official solution to this like you do.


Dave

Plus one. New Intel server with an X710 quad SFP NIC. Set up with a basic fixed IP4 and DHCP IP6 config on one port for the initial stages of building the server. Win 2022 sees the local network as Unidentified instead of the domain. Cant restart the NLA/NL services only kill them.
Couldn't get any joy with adding the domain suffix to the IP4 config. Switching IP6 off or on works so I've added a scheduled task with a delayed Powershell script to do that on bootup. A workaround rather than a fix.
Thanks for your posts. Helpful to know its a general problem and not just me. Cheers.
Hello,
Could you try this ? Setting/Creating the DWORD registry key "AlwaysExpectDomainController" located in "HKLM\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters" to 1, on top of adding DNS suffix on your NIC.

 

Wanted to update that the adding the domain suffix was only a temp fix as it started doing this again. So I now have a script to disable/enable IPv6 when I need to resolve this.  Annoying to say the least.

 

Dave

Hi, I went back to the initial config including removing the DNS suffix and disabling the startup IP6 off/on Powershell script. I tried your registry entry to make NLA persist with domain detection and did some test restarts. So far so good. Thanks for the tip.
Googling 'AlwaysExpectDomainController' I see this is recommended in several forums. Of interest is this one which describes a couple more registry entries to prevent incorrect network info being cached. I may experiment with these too if the current situation starts going pear-shaped:
https://learn.microsoft.com/en-us/answers/questions/400385/network-location-awareness-not-detecting-...
Cheers.
This has been an issue since Server 2012 and Microsoft cannot fix a fundamental part of a network configuration on boot up. Adding the domain name to the DNS and a delayed start on the Network Location Awareness service didn't fix the issue. For christ sake MS fix this **bleep**. Rebooting a server after an update should not be doing this. You've had 10 years or more to sort this crap out.
AlwaysExpectDomainController registry entry fixed me. So far so good.

@NickFranklin Agree..  I have at least 6 servers that do this and there is no rhyme or reason as to why these servers do it and others don't.  I've not found a permanent fix, it ALWAYS comes back at some point.

Dave

I've rolled out some registry tweaks on a Server 2022 install and fingers crossed it has survived 3 reboots.

https://learn.microsoft.com/en-us/answers/questions/400385/network-location-awareness-not-detecting-...
Are you referring to reg keys Sunny Qi mentioned?

@Dave Brunner Yes, are you saying this doesn't work. 

I have to check. I've tried EVERYTHING on my servers over the years and nothing has worked consistently. I'll check these registry values and report back next time I reboot a server and have to inevitable manually change the network location.
Well I have a brand new Server 2022 install, couldn’t restart the NLA service so rebooted, same problem, tried to restart the service it wouldn’t restart. Rebooted again same problem. Enabling and re-enabling IPV6 did fix the issue but a reboot failed again.

Added the registry settings and had 3 consecutive successful reboots.