top of page

PowerShell Enable RDP Access on Remote System


<# 
.SYNOPSIS     
    Set RDP Access Settings on Remote Computer 
.DESCRIPTION 
    Sets a registry setting on a remote computer to allow RDP access
.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 {Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server'-name "fDenyTSConnections" -Value 0}

bottom of page