Configure Scanner redirection on Windows over the Remote Desktop Protocol

Tip

This article is shared for services and products that use the Remote Desktop Protocol (RDP) to provide remote access to Windows desktops and apps.

Select a product using the buttons at the top of this article to show the relevant content.

You can configure the redirection behavior of scanners from a local device to a remote session over the Remote Desktop Protocol (RDP). Scanner redirection uses high-level peripheral reflection and supports TWAIN.

This article provides information about supported redirection methods and how to configure scanner redirection. To learn more about how redirection works, see Peripheral and resource redirection over the Remote Desktop Protocol.

Note

Scanner redirection over RDP is in preview.

Prerequisites

Before you configure scanner redirection, you need:

  • An existing Cloud PC.
  • An existing dev box.
  • A TWAIN scanner available on the local device. You need to make sure the scanner driver is installed correctly on the local device.

  • To configure Microsoft Intune, you need:

    • A Microsoft Entra ID account that's assigned the Policy and Profile manager built-in RBAC role.
    • A group containing the devices you want to configure.
  • To configure Group Policy, you need:

    • A domain account that has permission to create or edit Group Policy objects.
    • A security group or organizational unit (OU) containing the devices you want to configure.
  • You need to connect to a remote session from a supported app and platform. Windows App for Windows devices must be on build 2.0.1070.0. To view redirection support in Windows App and the Remote Desktop app, see Compare Windows App features across platforms and devices and Compare Remote Desktop app features across platforms and devices.

Session host configuration

To configure a session host for scanner redirection, you need to do the following:

  1. Review the default configuration:

    • Windows operating system: scanner redirection isn't blocked.
    • Session host: scanner redirection from the local device to a remote session is disabled.
    • Result: scanner redirection from the local device to a remote session is disabled.
  2. On each session host, launch command line with admin privileges and run the following command:

    reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v fTWAINRedirectionEnabled /t REG_DWORD /d 1 /f
    
  3. Install TwainRedirectorMsi-1.0.2603.17170.msi on each session host.

Cloud PC configuration

To configure a Cloud PC for scanner redirection, you need to do the following:

  1. Review the default configuration:

    • Windows operating system: scanner redirection isn't blocked.
    • Cloud PC: scanner redirection from the local device to a remote session is disabled.
    • Result: scanner redirection from the local device to a remote session is disabled.
  2. On each Cloud PC, launch command line with admin privileges and run the following command:

    reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v fTWAINRedirectionEnabled /t REG_DWORD /d 1 /f
    
  3. Install TwainRedirectorMsi-1.0.2603.17170.msi on each Cloud PC.

Dev box configuration

To configure a dev box for scanner redirection, you need to do the following:

  1. Review the default configuration:

    • Windows operating system: scanner redirection isn't blocked.
    • Dev box: scanner redirection from the local device to a remote session is disabled.
    • Result: scanner redirection from the local device to a remote session is disabled.
  2. On each dev box, launch command line with admin privileges and run the following command:

    reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v fTWAINRedirectionEnabled /t REG_DWORD /d 1 /f
    
  3. Install TwainRedirectorMsi-1.0.2603.17170.msi on each dev box.

Local device configuration

To configure scanner redirection on the local device, set the following registry values:

  1. Set fTWAINRedirectionEnableMode to control how scanner names appear in the remote session:

    • 1: Enabled, and the real scanner name is visible.
    • 2: Enabled, and the scanner appears as Redirected TWAIN Scanner.

    Choose the option that matches your app requirements. Use 1 if your app must see the real scanner name. Use 2 if your app works with the generic scanner profile.

    reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\Client" /v fTWAINRedirectionEnableMode /t REG_DWORD /d 1 /f
    
  2. Optionally, set TWAINSelectDeviceByName to automatically select a default scanner by name. When configured, this setting prevents users from manually selecting a different redirected scanner in the remote session. Use required value name 8000. Replace "HP LaserJet Pro MFP M428" with your scanner name. Keep the quotation marks in the command.

    reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\Client\TWAINSelectDeviceByName" /v 8000 /t REG_SZ /d "HP LaserJet Pro MFP M428" /f
    

Test scanner redirection

To test scanner redirection:

  1. Make sure a scanner is available on the local device and is working.

  2. Connect to a remote session using Windows App or the Remote Desktop app on a platform that supports scanner redirection. For more information, see Compare Windows App features across platforms and devices and Compare Remote Desktop app features across platforms and devices.

  3. Check the scanners that are connected to the remote session. With the display in full screen, on the status bar select the icon to select devices to use. This icon shows when Scanner and/or USB redirection is correctly configured.

    A screenshot showing the status bar of Windows App with a red box around the select devices to use icon.

  4. Check the box for the scanner you want to redirect to the remote session.

  5. Open a TWAIN-compatible application in the remote session and perform a test scan to confirm the scanner works.