Run the following Powershell commands to enable remote desktop.
#Enable Remote Desktop Invoke-Command -computername localhost -scriptblock {(gwmi -class win32_terminalservicesetting -namespace "root\cimv2\terminalservices").setallowtsconnections(1)} #Configure Firewall for Remote Desktop Invoke-command -computername localhost -scriptblock {netsh advfirewall firewall set rule group="remote desktop" new enable=Yes }