# Remote Desktop

# Enable Remote Desktop via command line

`reg add "HKLM\System\CurrentControlSet\Control\Terminal Server" /f /v fDenyTSConnections /t REG_DWORD /d 0`

# Registry keys to enable/disable clipboard and drive redirection

Under `HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services`, setting `fDisableClipboardRedirection` for the clipboard and `fDisableCdm` for drive redirection to either 1 or 0 disables or enables the respective functionality. These are the ones set through group policy - [Do not allow Clipboard redirection](https://admx.doctool.app/windows-11/ts-redirection/ts-client-clipboard) and [Do not allow drive redirection ](https://admx.doctool.app/windows-11/ts-redirection/ts-client-drive-m)respectively.

Under `HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp`, the super secret fun key which doesn't appear to be exposed in the interface anywhere. Set `fDisableClip` for the clipboard and `fDisableCdm` for drive redirection to either 1 or 0 to disable or enable the respective functionality. These are the ones you set if you want to enable hard mode for the person who has to make a policy change 8 years later who has to try and work out why the aforementioned group policy settings aren't working as expected.

There's also the Connection authorization policies under RD Gateway Manager which can affect device redirection functionality.