|
| 1 | +--- |
| 2 | +title: Install the Remote Desktop client for Windows on a per-user basis with Intune or Configuration Manager - Azure |
| 3 | +description: How to install the Azure Virtual Desktop client on a per-user basis with Intune or Configuration Manager. |
| 4 | +author: dknappettmsft |
| 5 | +ms.topic: how-to |
| 6 | +ms.date: 09/01/2023 |
| 7 | +ms.author: daknappe |
| 8 | +--- |
| 9 | + |
| 10 | +# Install the Remote Desktop client for Windows on a per-user basis with Intune or Configuration Manager |
| 11 | + |
| 12 | +You can install the [Remote Desktop client for Windows](./users/connect-windows.md) on either a per-system or per-user basis. Installing it on a per-system basis installs the client on the machines for all users by default, and administrators control updates. Per-user installation installs the application to a subfolder within the local AppData folder of each user's profile, enabling users to install updates with needing administrative rights. |
| 13 | + |
| 14 | +When you install the client using `msiexec.exe`, per-system is the default method of client installation. You can use the parameters `ALLUSERS=2 MSIINSTALLPERUSER=1` with msiexec to install the client per-user, however, if you're deploying the client with Intune or Configuration Manager, using msiexec directly to install causes the client to be installed per-system, regardless of the parameters used. Wrapping the msiexec command in a PowerShell script enables the client to be successfully installed per-user. |
| 15 | + |
| 16 | +## Prerequisites |
| 17 | + |
| 18 | +In order to install the Remote Desktop client for Windows on a per-user basis with Intune or Configuration Manager, you need the following things: |
| 19 | + |
| 20 | +- Devices managed by Microsoft Intune or Configuration Manager with permission to add applications. |
| 21 | + |
| 22 | +- Download the latest version of [the Remote Desktop client for Windows](./users/connect-windows.md?toc=/azure/virtual-desktop/toc.json&bc=/azure/virtual-desktop/breadcrumb/toc.json). |
| 23 | + |
| 24 | +- For Intune, you need a local Windows device to use the [Microsoft Win32 Content Prep Tool](https://github.com/Microsoft/Microsoft-Win32-Content-Prep-Tool). |
| 25 | + |
| 26 | +## Install the Remote Desktop client per-user using a PowerShell script |
| 27 | + |
| 28 | +To install the client on a per-user basis using a PowerShell script, select the relevant tab for your scenario and follow the steps. |
| 29 | + |
| 30 | +#### [Intune](#tab/intune) |
| 31 | + |
| 32 | +Here's how to install the client on a per-user basis using a PowerShell script with Intune as a *Windows app (Win32)*. |
| 33 | + |
| 34 | +1. Create a new folder on your local Windows device and add the Remote Desktop client MSI file you downloaded. |
| 35 | + |
| 36 | +1. Within that folder, create a PowerShell script file called `Install.ps1` and add the following content, replacing `<RemoteDesktop>` with the filename of the `.msi` file you downloaded: |
| 37 | + |
| 38 | + ```powershell |
| 39 | + msiexec /i <RemoteDesktop>.msi /qn ALLUSERS=2 MSIINSTALLPERUSER=1 |
| 40 | + ``` |
| 41 | + |
| 42 | +1. In the same folder, create a PowerShell script file called `Uninstall.ps1` and add the following content: |
| 43 | + |
| 44 | + ```powershell |
| 45 | + $productCode = (Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -eq 'Remote Desktop' -and $_.Vendor -eq 'Microsoft Corporation'}).IdentifyingNumber |
| 46 | +
|
| 47 | + msiexec /x $productCode /qn |
| 48 | + ``` |
| 49 | + |
| 50 | +1. Follow the steps in [Prepare Win32 app content for upload](/mem/intune/apps/apps-win32-prepare) to package the contents of the folder into an `.intunewin` file. |
| 51 | + |
| 52 | +1. Follow the steps in [Add, assign, and monitor a Win32 app in Microsoft Intune](/mem/intune/apps/apps-win32-add) to add the Remote Desktop client. You need to specify the following information during the process: |
| 53 | + |
| 54 | + | Parameter | Value/Description | |
| 55 | + |--|--| |
| 56 | + | Install command | `powershell.exe -ExecutionPolicy Bypass -WindowStyle Hidden -File .\Install.ps1` | |
| 57 | + | Uninstall command | `powershell.exe -ExecutionPolicy Bypass -WindowStyle Hidden -File .\Uninstall.ps1` | |
| 58 | + | Install behavior | Select **User**. | |
| 59 | + | Operating system architecture | Select **64-bit**. | |
| 60 | + | Detection rules format | Select **Manually configure detection rules**. | |
| 61 | + | Detection rule type | Select **File**. | |
| 62 | + | Detection rule path | `%LOCALAPPDATA%\Programs\Remote Desktop\` | |
| 63 | + | Detection rule file or folder | `msrdc.exe` | |
| 64 | + | Detection method | Select **File or folder exists**. | |
| 65 | + | Assignments | Assign to users you want to use the Remote Desktop client. | |
| 66 | + |
| 67 | +#### [Configuration Manager](#tab/configmgr) |
| 68 | + |
| 69 | +Here's how to install the client on a per-user basis using a PowerShell script with Configuration Manager as a *Script Installer*. |
| 70 | + |
| 71 | +1. Create a new folder in your content location share for Configuration Manager and add the Remote Desktop client MSI file you downloaded. |
| 72 | + |
| 73 | +1. Within that folder, create a PowerShell script file called `Install.ps1` and add the following content, replacing `<RemoteDesktop>` with the filename of the `.msi` file you downloaded: |
| 74 | + |
| 75 | + ```powershell |
| 76 | + msiexec /i <RemoteDesktop>.msi /qn ALLUSERS=2 MSIINSTALLPERUSER=1 |
| 77 | + ``` |
| 78 | + |
| 79 | +1. In the same folder, create a PowerShell script file called `Uninstall.ps1` and add the following content: |
| 80 | + |
| 81 | + ```powershell |
| 82 | + $productCode = (Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -eq 'Remote Desktop' -and $_.Vendor -eq 'Microsoft Corporation'}).IdentifyingNumber |
| 83 | +
|
| 84 | + msiexec /x $productCode /qn |
| 85 | + ``` |
| 86 | + |
| 87 | +1. Follow the steps in [Create applications in Configuration Manager](/mem/configmgr/apps/deploy-use/create-applications) and [manually specify application information](/mem/configmgr/apps/deploy-use/create-applications#bkmk_manual-app) to add the Remote Desktop client. You need to specify the following information during the process: |
| 88 | + |
| 89 | + | Parameter | Value/Description | |
| 90 | + |--|--| |
| 91 | + | Deployment type | Select **Script Installer**. | |
| 92 | + | Content location | Enter the UNC path to the new folder you created. | |
| 93 | + | Installation program | `powershell.exe -ExecutionPolicy Bypass -WindowStyle Hidden -File .\Install.ps1` | |
| 94 | + | Uninstall program | `powershell.exe -ExecutionPolicy Bypass -WindowStyle Hidden -File .\Uninstall.ps1` | |
| 95 | + | Detection method | Select **Configure rules to detect the presence of this deployment type**. | |
| 96 | + | Detection rule setting type | Select **File System**. | |
| 97 | + | Detection rule type | Select **File**. | |
| 98 | + | Detection rule path | `%LOCALAPPDATA%\Programs\Remote Desktop\` | |
| 99 | + | Detection rule file or folder name | `msrdc.exe` | |
| 100 | + | Detection rule criteria | Select **The file system setting must exist on the target system to indicate presence of this application**. | |
| 101 | + | Installation behavior | Select **Install for user**. | |
| 102 | + |
| 103 | +1. Follow the steps in [Deploy applications with Configuration Manager](/mem/configmgr/apps/deploy-use/deploy-applications) to deploy the Remote Desktop client to your users. |
| 104 | + |
| 105 | +--- |
| 106 | + |
| 107 | +## Next steps |
| 108 | + |
| 109 | +Learn more about the Remote Desktop client at [Use features of the Remote Desktop client for Windows](./users/client-features-windows.md?toc=/azure/virtual-desktop/toc.json&bc=/azure/virtual-desktop/breadcrumb/toc.json). |
0 commit comments