Solving RemoteFX USB Redirection Woes: A Handy PowerShell Script for Intune Admins

Quick post here! Intune admins have reported an issue with the ‘Allow RDP redirection of other supported RemoteFX USB devices from this computer’ setting not functioning as expected when managed via Microsoft Intune. This issue affects Windows 10 and 11 devices. Despite the successful delivery of the policy via Microsoft Intune, the setting fails to take effect, leaving users unable to utilize RemoteFX USB redirection as intended.

I wanted to provide Intune admins with a PowerShell script to set the Windows registry values needed to control the RemoteFX USB redirection setting, which can be delivered via the PowerShell scripts option available in Intune: Add PowerShell scripts to Windows 10/11 devices in Microsoft Intune | Microsoft Learn

# This script creates the registry keys and values needed to enable RemoteFX USB Redirection in Windows 10 and Windows 11. A restart is required for the changes to take effect.
# Run this script using administrator privileges or run it under the system context.
# Define common parameters
$CommonParams = @{
    Force = $true
    ErrorAction = 'SilentlyContinue'
    OutVariable = $null
}

# Create registry properties and keys
New-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\Client" -Name "fUsbRedirectionEnableMode" -Value 2 -PropertyType DWORD @CommonParams
New-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Class\{36fc9e60-c465-11cf-8056-444553540000}" -Name "UpperFilters" -Value "TsUsbFlt" -PropertyType MultiString @CommonParams
New-ItemProperty -Path "HKLM:\System\CurrentControlSet\Services\TsUsbFlt" -Name "BootFlags" -Value 4 -PropertyType DWORD @CommonParams
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\PnpResources\Registry\HKLM\SYSTEM\CurrentControlSet\Services\TsUsbFlt" @CommonParams
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\PnpResources\Registry\HKLM\SYSTEM\CurrentControlSet\Services\TsUsbFlt\BootFlags" @CommonParams
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\PnpResources\Registry\HKLM\SYSTEM\CurrentControlSet\Services\TsUsbFlt\BootFlags" -Name "Owners" -Value "TsUsbHubFilter.inf" -PropertyType MultiString @CommonParams
New-Item -Path "HKLM:\System\CurrentControlSet\Services\usbhub\hubg" @CommonParams
New-ItemProperty -Path "HKLM:System\CurrentControlSet\Services\usbhub\hubg" -Name "EnableDiagnosticMode" -Value 2147483648 -PropertyType DWORD @CommonParams

Remember, a device restart is required after applying the registry key changes to ensure proper functionality. Whether managing RemoteFX via Group Policy or Intune, this requirement remains consistent.

Hope this helps!

Leave a Comment

Your email address will not be published. Required fields are marked *