Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Windows 10 / Copy/Paste Not Working in Remote Desktop (RDP) Clipboard

February 28, 2023 Windows 10Windows 11Windows Server 2019

Copy/Paste Not Working in Remote Desktop (RDP) Clipboard

You can use the clipboard in an RDP session to copy/paste text and files between a local computer and a remote host (this can be either a Windows workstation or an RDS farm on a Windows Server). Sometimes the clipboard in the Windows Remote Desktop session (or RemoteApp) stops working and you cannot transfer (copy/paste) your text or files between your computer and the RDP server.

Several scenarios are possible: check that clipboard redirection is enabled on the RDP client, check that the RDS host allows files/data to be copied via the RDP clipboard, or restart the failed rdpclip.exe process in the user’s current terminal session.

Contents:
  • Restart the Rdpclip.exe (RDP Clipboard) Process in Windows
  • Enable Clipboard in Remote Desktop Client on Windows
  • How to Enable or Disable Copy/Paste via RDP Clipboard on Windows?

Restart the Rdpclip.exe (RDP Clipboard) Process in Windows

If the clipboard suddenly stops working in the RDP session, and the Paste option in the context menu has become inactive, the easiest way is to gracefully end the current RDP session (logoff) and reconnect. This will fix the Remote Desktop clipboard issue for sure. However, this is inconvenient as you will need to restart all applications in an RDP session. Fortunately, there is a way to restore the correct clipboard operation in an RDP session without logging off.

Rdpclip.exe is responsible for operating the clipboard between your computer and the Remote Desktop host. When a remote user connects to Remote Desktop, a separate rdpclip.exe process is started for each session. You can use the Task Manager to kill therdpclip.exe (RDP Clipboard Monitor) process and start it again manually (Task Manager -> File -> Start new task -> rdpclip -> Enter).

rdp clipboard monitor - end task using task manager

Usually, it helps to restore the remote clipboard operation quickly. Check that copy/paste (Ctrl+C / Ctrl+V) now works in the RDP session.

re-run the rdpclip.exe process on windows

Users can restart the rdpclip.exe process if it has hung up using a simple PowerShell script. Simply place the *.PS1 file on the Public profile Desktop or copy it to users’ desktops via GPO.

(Get-WmiObject -Query "select * from Win32_Process where name='RDPClip.exe'"|?{$_.GetOwner().User -eq $ENV:USERNAME}).Terminate()
rdpclip.exe

To make it easier to use the script, you can sign the PowerShell script file or configure a PowerShell Execution Policy.

Enable Clipboard in Remote Desktop Client on Windows

Check that your RDP client settings allow you to use the clipboard in the terminal session. If you are using the built-in Windows RDP client (Remote Desktop Connection, mstsc.exe ) to connect to a remote terminal host, check that its settings allow copying via the RDP clipboard.

Go to the Local Resources tab, and make sure the Clipboard option is enabled in the “Choose the devices and resources that you want to use in your remote session” section.

mstsc.exe allow clipboard usage in order to copy and paste in the remote desktop session

If you want to allow files to be copied via the RDP clipboard, click the More button and check the Drives option. This will allow the use of local drives in the RDP session for file copying tasks.

rdp client mstsc: enable drives redirection

If you are using an alternative RDP client, such as Remote Desktop Connection Manager (RDCMan) or mRemoteNG, note that the Remote Clipboard option may be called differently.

If you are using a pre-configured *.RDP file with settings to connect to a remote computer (for example, to connect to a published RemoteApp on RDS), check that the following options are configured in it:

redirectclipboard:i:1
redirectdrives:i:1
drivestoredirect:s:*
  • redirectclipboard — allows using the local clipboard in a remote session;
  • Drivestoredirect and redirectdrives – enable redirection of all local drives to the RDP session (required if you want to copy/paste files through RDP).

How to Enable or Disable Copy/Paste via RDP Clipboard on Windows?

You can enable or disable the use of the RDP clipboard for copy/paste operations on the Windows host through Group Policy or registry settings.

  1. Run the Local Group Policy Editor: gpedit.msc
  2. Go to Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Device and Resource Redirection;
  3. To prevent copying data to/from a remote server using the clipboard of an RDP session, set the following policies to Enabled:
    Do not allow Clipboard redirection – clipboard redirection is used to copy text or files using the RDP clipboard;
    Do not allow drive redirection – allows the user to access their local drives in an RDP session. It is also used to copy files between a local computer and an RDP host;
    group policy: Do not allow Clipboard redirection When these policies are enabled, the following DWORD parameters are created in the HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services registry key:fDisableCdm = 1 (disable local drive redirection on RDP host)
    fDisableClip = 1 (Disable clipboard between RDP server and client)
    There are similar policy settings in the user GPO section. This means that you can disable the use of the clipboard and the mapped drives for specific RDP users. You can disable the RDP clipboard for non-admin users on a standalone (workgroup) computer by using multiple local GPOs (MSLGO).
  4. If you want to force the use of the RDP clipboard, change the values of the settings to Disabled (by default, RDPClipboard is allowed to be used to copy data between a local computer and a remote RDP host);
  5. Update the Group Policy settings using gpupdate /force. For new settings to be applied to users, they must end their RDP sessions (using Logoff instead of Disconnect) or wait for user sessions to be automatically disconnected according to RDS timeouts.

You can use the registry to completely disable the RDP clipboard and local drive redirection for all users on an RDP-enabled Windows host. To do this, create REG_DWORD parameters in the HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server registry key:

  • DisableClipboardRedirection = 1
  • DisableDriveRedirection = 1

And the two parameters that were discussed above in the HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services registry branch:

  • fDisableCdm =1
  • fDisableClip = 1

To quickly disable the ability to copy data between a computer and a remote RDP host via a clipboard, run the following commands:

reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server” /v “DisableClipboardRedirection" /t REG_DWORD /d 1 /f
reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server” /v “DisableDriveRedirection" / t REG_DWORD /d 1 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v fDisableCdm /t REG_DWORD /d 1 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v fDisableClip /t REG_DWORD /d 1 /f

If you want to allow the RDP clipboard to be used, these registry settings should be missing (by default) or set to 0

You can check the value of a registry setting using PowerShell:
Get-ItemProperty -Path 'HKLM:SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' | Select fDisableClip,fDisableCdm

fDisableClip option in registry

If you are using RDS hosts running Windows Server 2022/2019/2016/2012R2, you can enable or disable the clipboard and the local drives redirection in the RDS collection settings. Open the Server Manager -> Remote Desktop Services -> Collections -> Tasks -> Edit Properties -> Client Settings. Uncheck Clipboard and Drives options in the Enable redirecting for the following section.

windows server rds -disable clipboard redirection in collection settings

The Drives option allows you to use the clipboard to copy files (the local drives will be used in an RDS session).

You can change the RDS collection settings with PowerShell:

Set-RDSessionCollectionConfiguration -CollectionName munRDSApp1 -ClientDeviceRedirectionOptions "Clipboard,Drive"

If you are using a Remote Desktop Gateway to connect to the RDS host, note that you can disable or allow the use of the clipboard in your CAP (Connection Authorization Policy) settings. By default, the Enable device redirection for all client devices option is enabled in the Device Redirection section. Here you can disable the RDP clipboard and local drives redirection.

rds gateway: enable clipboard

If you want to prevent users, but not administrators, from copying to/from an RDP session, you can change the NTFS permissions on the executable C:\windows\system32\rdpclip.exe. To do this, uncheck the Read/Execute permissions for the built-in Users group in the file’s security properties (you will have to change the file owner from TrustedInstaller to another one first).

prevent using of rdpclip by non-admin users

7 comments
6
Facebook Twitter Google + Pinterest
previous post
How to Disable NTLM Authentication in Windows Domain
next post
Find and Remove Locks in Microsoft SQL Server

Related Reading

How to Connect VPN Before Windows Logon

November 14, 2023

Using WPAD (Web Proxy Auto-Discovery Protocol) on Windows

November 7, 2023

Zabbix: How to Get Data from PowerShell Scripts

October 27, 2023

Tracking Printer Usage with Windows Event Viewer Logs

October 19, 2023

How to Use Ansible to Manage Windows Machines

September 25, 2023

7 comments

BAKEMONO April 8, 2021 - 3:51 pm

Hello,
just a question (you never know), is it possible to copy text from a web page (.php) in a browser (edge, ff) then, in a “RDP” remote desktop session (and RDP in citrix too) to paste the text into PowerShell, without DOM or invisible characters?
Cordially.

Reply
paola January 19, 2022 - 3:43 am

hola, no me aparece en el administrador ese proceso?? que puedo hacer?

Reply
paola January 20, 2022 - 2:06 pm

hola, pero es rdpclip no esta en ejecución, y¿y no permite copiar, pero he verificado en otro servidor que si deja copiar y pegar, y tampoco tiene ese servicio pero si deja copiar y pegar

Reply
Kimi February 23, 2022 - 9:25 pm

Using the Task Manager, you can kill the rdpclip.exe (RDP Clipboard Monitor) process and run it manually (Task Manager -> File -> Start new task -> rdpclip -> Enter).

It’s working, thanks.

Reply
Alex April 18, 2023 - 6:37 pm

Working beautifully on Win 2019

Reply
Carlos October 25, 2023 - 8:28 am

Great, I had everything set up correctly except for this entry:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services registry branch:
fDisableCdm =1
(It came out to 1 and changing it to 0 has let me copy and paste)
Thank you

Reply
MrMattiPants November 14, 2023 - 11:12 pm

Just a heads-up. I found that the $ENV.USERNAME Variable doesn’t always work in RDS. Therefore, you may need to use [ENVIRONMENT]::USERNAME in it’s place.

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • How to Connect VPN Before Windows Logon

    November 14, 2023
  • Removing Azure Arc Setup Feature on Windows Server 2022

    November 9, 2023
  • Using WPAD (Web Proxy Auto-Discovery Protocol) on Windows

    November 7, 2023
  • Send Emails with Microsoft Graph API and PowerShell

    November 6, 2023
  • Zabbix: How to Get Data from PowerShell Scripts

    October 27, 2023
  • Tracking Printer Usage with Windows Event Viewer Logs

    October 19, 2023
  • PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

    October 15, 2023
  • Reset Root Password in VMware ESXi

    October 12, 2023
  • How to Query and Change Teams User Presence Status with PowerShell

    October 8, 2023
  • How to Increase Size of Disk Partition in Ubuntu

    October 5, 2023

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • How to Allow Multiple RDP Sessions on Windows 10 and 11
  • How to Repair EFI/GPT Bootloader on Windows 10 or 11
  • How to Restore Deleted EFI System Partition in Windows
  • Network Computers are not Showing Up in Windows 10/11
  • How to Run Program without Admin Privileges and Bypass UAC Prompt
  • Fix: BSOD Error 0x0000007B (INACCESSABLE_BOOT_DEVICE) on Windows
  • Fixing ‘The Network Path Was Not Found’ 0x80070035 Error Code on Windows
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top