PowerShell Enable RDP Access

    Set RDP Access Settings on Remote Computer 
    Sets a registry setting on a remote computer to allow RDP access
    Enter the server name when prompted 
    Requires WinRM to access the remote machine/s and rights on that machine

$Server=Read-Host "Enter ServerName"

invoke-command $Server -Scriptblock {Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server'-name "fDenyTSConnections" -Value 0}

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