Forum Discussion

bradcope's avatar
bradcope
Copper Contributor
Sep 05, 2021

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

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:

Narrowing down the error, i run the below command:

 

 

restart-service -Name netprofm -Force

 

 

Which results in the below error:


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?

  • 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...

    • bradcope's avatar
      bradcope
      Copper Contributor
      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
    • nileshpancholi's avatar
      nileshpancholi
      Copper Contributor

      @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."

      • TT_Vert's avatar
        TT_Vert
        Copper Contributor
        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
  • RonaldRossi's avatar
    RonaldRossi
    Copper Contributor
    The Sunny Qi information is part of our SOP on server installs. works every time
    Those 3 registry tweaks work well
    The service restarting issue is new, had the issue on a Win10 pro workstation in a workgroup today and had to disable, re-enable the NIC, script it for remote service
    • TT_Vert's avatar
      TT_Vert
      Copper Contributor
      Same here. Have deployed this to every server we manage now. No idea why MS cannot get their crap together after at least 3 OS versions.
  • guy_e's avatar
    guy_e
    Copper Contributor
    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.
    • Alban1998's avatar
      Alban1998
      Iron Contributor
      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.
      • guy_e's avatar
        guy_e
        Copper Contributor
        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-domain-ne
        Cheers.
  • JimBecher's avatar
    JimBecher
    Copper Contributor

    The whole world blows but Microsoft Support sucks so bad it equalizes the pressure. I have had a ticket opened on this issue for four months now. I finally got a call on it just the other day. In all of 60 seconds the tech said his department couldn't handle it and would have to passed it off to another department. So maybe I will get a call in another four month? There is bad and then there is Microsoft...... 

    • TT_Vert's avatar
      TT_Vert
      Copper Contributor

      JimBecher 
      I empathize!  I am an MS partner and have had nothing but bad support.  It seems they actually outsource this often to independent contractors now.  Oddly the ONE time I had great support was through an IC.  

      • JimBecher's avatar
        JimBecher
        Copper Contributor

        TT_Vert Yes they outsourced to Convergence a couple years ago and it sucks. Now, even with Office 365 support, I have had a ticket open for 3 days and have yet to receive help. Microsoft kinda sucks in general. Has for years. 

         

        Back to the NLASVC..... my ticket, after 6 months, is still open. Best they can do is a set of command lines that effectively kill the task and restarts it. Not really a fix but hey.... it's Microsoft. Pretty par for the course for them.

Resources