Only is needed three comands to enable RDP in powershell
New-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -Name 'fDenyTSConnections' -Value 0 -PropertyType dword -Force
To Enable RDP
New-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name 'UserAuthentication' -Value 1 -PropertyType dword -Force
To Enable NLA
Enable-NetFirewallRule -DisplayGroup 'Remote Desktop'
To Enable on Firewall