PowerShell Disable NLA Auth RDP Setting

    
<# 

ScriptsByScott.com

.SYNOPSIS     
    Set RDP Access Settings on Remote Computer by UnChecking the Box.
.DESCRIPTION 
    Sometimes the remote settings using NLA authentication keeps users from accessing systems and needs to be shut off.
.EXAMPLE  
    Enter the server name when prompted 
 Notes:
    Requires WinRM to access the remote machine/s and rights on that machine
#>   

$Server=Read-Host "Enter ServerName"

invoke-command $Server -Scriptblock {(Get-WmiObject -class "Win32_TSGeneralSetting" -Namespace root\cimv2\terminalservices -ComputerName $Env:Computername  -Filter "TerminalName='RDP-tcp'").SetUserAuthenticationRequired(0) }                   
        

2020 | Scott W. Head  |  Sr. Systems Admin | Certified Microsoft Windows Server Administrator