ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Disable Network Level Authentication or NLA Remotely via PowerShell

    IT Discussion
    nla rdp powershell windows windows server credssp
    2
    4
    20.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller
      last edited by

      If you have NLA enabled on a remote server and need to RDP into it, you may find yourself in a situation where you are locked out and cannot disable the security on the remote machine in order to make the connection. A situation many people found happening to themselves recently thanks to a patch from Microsoft.

      If you still have PSRemoting working, you are in luck, it is trivially easy to disable this function from PowerShell.

      Disabling NLA is as simple as this command:

      (Get-WmiObject -class "Win32_TSGeneralSetting" -Namespace root\cimv2\terminalservices -ComputerName "remoteServer" -Filter "TerminalName='RDP-tcp'").SetUserAuthenticationRequired(0)
      

      You can enable NLA by changing that final (0) into a (1).

      We can check on the NLA status, it returns 1 for on and 0 for off:

      (Get-WmiObject -class "Win32_TSGeneralSetting" -Namespace root\cimv2\terminalservices -ComputerName "remoteServer" -Filter "TerminalName='RDP-tcp'").UserAuthenticationRequired
      
      1 Reply Last reply Reply Quote 2
      • scottalanmillerS
        scottalanmiller
        last edited by

        Example thread of people affected where this fix would often work:

        https://mangolassi.it/topic/17184/credssp-and-rdp-in-windows-10

        1 Reply Last reply Reply Quote 0
        • dbeatoD
          dbeato
          last edited by

          @scottalanmiller said in Disable Network Level Authentication or NLA Remotely via PowerShell:

          (Get-WmiObject -class "Win32_TSGeneralSetting" -Namespace root\cimv2\terminalservices -ComputerName "remoteServer" -Filter "TerminalName='RDP-tcp'").SetUserAuthenticationRequired(0)

          This worked, but also as soon as the server is updated to the latest then the issue goes away.

          scottalanmillerS 1 Reply Last reply Reply Quote 0
          • scottalanmillerS
            scottalanmiller @dbeato
            last edited by

            @dbeato said in Disable Network Level Authentication or NLA Remotely via PowerShell:

            @scottalanmiller said in Disable Network Level Authentication or NLA Remotely via PowerShell:

            (Get-WmiObject -class "Win32_TSGeneralSetting" -Namespace root\cimv2\terminalservices -ComputerName "remoteServer" -Filter "TerminalName='RDP-tcp'").SetUserAuthenticationRequired(0)

            This worked, but also as soon as the server is updated to the latest then the issue goes away.

            Yes, if you have that option.

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post