

# USB redirection for WorkSpaces
<a name="usb-redirection"></a>

Universal Serial Bus (USB) redirection enables access to local USB devices within your virtual desktop environment. USB redirection is supported on both PCoIP and DCV-based WorkSpaces. The implementation varies depending on the protocol used by your WorkSpace.

**Topics**
+ [USB redirection for PCoIP WorkSpaces](usb-redirection-pcoip.md)
+ [USB redirection for DCV WorkSpaces](usb-redirection-dcv.md)

# USB redirection for PCoIP WorkSpaces
<a name="usb-redirection-pcoip"></a>

USB is used to connect computers to devices, such as scanners, printers, external drives, and security keys. USB redirection enables access to local USB devices within your virtual desktop environment.

PCoIP Windows WorkSpaces support redirection of a locally attached YubiKey for universal 2nd factor authentication from the Windows WorkSpaces client application.

**Note**  
YubiKey redirection is only supported for Windows WorkSpaces clients.

## Requirements
<a name="usb-requirements"></a>
+ USB redirection is disabled by default on Windows PCoIP WorkSpaces. You must enable USB redirection for WorkSpaces. You can configure USB device rules to define which devices can be redirected. For more information, see [Manage your Windows WorkSpaces](https://docs.aws.amazon.com/workspaces/latest/adminguide/group_policy.html) 
+ Install WorkSpaces client version 4.0 or later, with the USB redirection driver, locally. For more information, see [Setup and installation](amazon-workspaces-windows-client.md#windows_setup).

## Supported USB devices
<a name="supported-usb-devices"></a>

The following is a list of USB YubiKey models that are validated to work with the PCoIP Windows WorkSpaces redirection for U2F:
+ YubiKey 4
+ YubiKey 5 NFC
+ YubiKey 5 Nano
+ YubiKey 5C
+ YubiKey 5C Nano
+ YubiKey 5 NFC
+ Most USB type C to USB type A adapters can be used with a supported YubiKey

## Unsupported USB devices
<a name="unsupported-usb-devices"></a>

Most USB mass storage devices and some scanners and printers use data transfer types, including control, interrupt, and bulk. Devices using these data transfer types are not supported but they may be redirected in your WorkSpaces. Isochronous transfers, which are commonly used in webcams, are not supported. Therefore, USB webcams are not supported. 

The following USB device is validated to work with PCoIP WorkSpaces for U2F authentication, although it is not supported:
+ Thetis Security Key

The following USB device doesn't work with PCoIP WorkSpaces for U2F authentication:
+ Kensington Security Key

## Connecting your USB device to your WorkSpace
<a name="connect-usb-devices"></a>

**To connect your local USB device to your WorkSpace**
**Warning**  
When you connect a local USB device to your WorkSpace, it is no longer available for use by your local computer. For example, if you redirect your USB mouse to the WorkSpace, your computer cannot receive mouse input from the redirected USB mouse until you disconnect it from the WorkSpace.

USB device connections do not persist across WorkSpaces streaming sessions. You must connect your USB device each time that you connect to your WorkSpace. Up to 10 USB devices can be redirected concurrently in a WorkSpaces streaming session.

1. Log in to a PCoIP Windows WorkSpace using the WorkSpaces Windows client application.

1. On the client interface, click the **Devices** icon to list the locally attached USB devices.

1. Select the USB device and choose **Use with WorkSpaces** from the menu next to the device name.

1. Your USB device is ready to use with your WorkSpace.

## Disconnecting your USB device from your WorkSpace
<a name="disconnect-usb-devices"></a>

**To disconnect your local USB device from your WorkSpace**

1. On the client interface, click the icon to list the locally attached USB devices.

1. Select the USB device and choose **Use with local device** from the menu next to the device name.

1. Your USB device is ready to use with your local computer.

## Reinstalling or upgrading your USB redirection drivers
<a name="upgrade-usb-devices"></a>

**To reinstall or upgrade USB redirection drivers**

Follow these steps to do a clean re-installation or upgrade of the drivers.

1. Uninstall the USB redirection drivers by running the following command.

   ```
   [Amazon WorkSpaces directory]\pcoipusb\bin\USB\PCoIP_Client_USB_uninstaller.exe
   ```

1. Reboot your machine.

1. Open the **Registry Editor** editor.

1. Under **HKLM**, search for **fusbhub**.

1. Remove the registry key, which is the item in the left pane with the folder icon. In this case it is the **fuhub** key, containing **fusbhub**. If you cannot remove this registry key, make note of the .inf file name that's associated with the registry entry. The .inf file name usually starts with "oem," for example "oem9.inf". Open the command line (using administrator privileges), and run the following prompt, substituting the .inf file name for *oem9.inf*.

   ```
   pnputil -f -d oem9.inf
   ```

1. Repeat step 5 until **fusbhub** is completely removed from the registry editor.

1. Reboot your machine.

1. For upgrades only, you must download the latest client and install it. You can choose to install USB drivers during the client installation.

1. After you log into your WorkSpace, select the **Devices** icon ![\[Devices icon\]](http://docs.aws.amazon.com/workspaces/latest/userguide/images/devices-icon.png), and reinstall the USB driver. Alternatively, you can invoke the following PowerShell script (using administrator privileges).

   ```
   [Amazon WorkSpaces directory]\pcoipusb\install-pcoip-usb-driver.ps1
   ```

# USB redirection for DCV WorkSpaces
<a name="usb-redirection-dcv"></a>

Starting with WorkSpaces Windows client version 5.30.0, Amazon WorkSpaces supports generic USB redirection for the WorkSpaces app on Windows. This allows you to access local USB devices within your virtual desktop environment. This feature complements existing optimized redirection solutions for specific device classes such as printers and WebAuthn.

## Prerequisites
<a name="usb-redirection-dcv-prerequisites"></a>

To use USB redirection for DCV WorkSpaces, you need the following:
+ Windows WorkSpace agent using DCV protocol version 2.2.0.2047 or later
+ WorkSpaces Windows client version 5.30.0 or later
+ You must have administrator access on your device to install or update USB redirection drivers.

## Install USB redirection drivers
<a name="usb-redirection-dcv-installation"></a>

When you install the WorkSpaces client app, you have the option to install drivers required for USB redirection. The Amazon DCV USB drivers are installed through a separate installer that runs after the client app installation is complete.

**Important**  
You must have administrator access on your device to install USB redirection drivers. You might be prompted to restart your device after installing the drivers.

You can also install USB redirection drivers from the toolbar **Devices** dialog.

## Redirect a USB device
<a name="usb-redirection-dcv-redirecting"></a>

Your administrator can enable USB redirection on a Windows WorkSpace, which allows specified devices to be redirected to the virtual desktop. Devices that are allowed for redirection appear in the devices dialog from the in-session toolbar.

**To redirect a USB device**

1. In your WorkSpace session, choose the **Devices** icon in the toolbar.

1. In the devices dialog, locate the device you want to redirect.

1. Choose **Use on my remote WorkSpace** for the device.

**Important**  
Redirected devices can only be used on the WorkSpace and are not available for use on the local machine.

## Request access to blocked devices
<a name="usb-redirection-dcv-not-allowed"></a>

In the devices dialog, you can see devices that are not allowed for USB redirection by your administrator. To request that your administrator enable a device for redirection, use the copy device details button next to the device and share the copied details with your administrator.

## Update USB redirection drivers
<a name="usb-redirection-dcv-driver-updates"></a>

When an update is available for the USB redirection drivers, a notification appears on the devices icon in the toolbar. Choose the notification to open the devices dialog, where you can follow the instructions to update the drivers.

**Important**  
You must have administrator access on your device to update USB redirection drivers. You might be prompted to restart your device after updating the drivers.