|
1 | 1 | ---
|
2 | 2 | title: Install the Remote Desktop client for Windows on a per-user basis with Intune or Configuration Manager - Azure
|
3 | 3 | description: How to install the Azure Virtual Desktop client on a per-user basis with Intune or Configuration Manager.
|
4 |
| -author: Heidilohr |
| 4 | +author: dknappettmsft |
5 | 5 | ms.topic: how-to
|
6 |
| -ms.date: 06/09/2023 |
7 |
| -ms.author: helohr |
8 |
| -manager: femila |
| 6 | +ms.date: 09/01/2023 |
| 7 | +ms.author: daknappe |
9 | 8 | ---
|
| 9 | + |
10 | 10 | # Install the Remote Desktop client for Windows on a per-user basis with Intune or Configuration Manager
|
11 | 11 |
|
12 |
| -You can install the Remote Desktop client 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 updates are controlled by the admin. Per-user installation installs the application into each user's profile, giving them control over when to apply updates. |
| 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 | 13 |
|
14 |
| -Per-system is the default way to install the client. However, if you're deploying the Remote Desktop client with Intune or Configuration Manager, using the per-system method can cause the Remote Desktop client auto-update feature to stop working. In these cases, you must use the per-user method instead. |
| 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 | 15 |
|
16 | 16 | ## Prerequisites
|
17 | 17 |
|
18 | 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 | 19 |
|
20 |
| -- An Azure Virtual Desktop or Windows 365 deployment. |
21 |
| -- Download the latest version of [the Remote Desktop client](./users/connect-windows.md?toc=/azure/virtual-desktop/toc.json&bc=/azure/virtual-desktop/breadcrumb/toc.json). |
22 |
| -- Microsoft Intune, Configuration Manager or other enterprise software distribution product. |
23 |
| - |
24 |
| -## Install the Remote Desktop client using a batch file |
25 |
| - |
26 |
| -To install the client on a per-user basis using a batch file: |
27 |
| - |
28 |
| -#### [Intune](#tab/intune) |
29 |
| - |
30 |
| -1. Create a new folder containing the Remote Desktop client MSI file. |
31 |
| - |
32 |
| -1. Within that folder, create an `install.bat` batch file with the following content: |
33 |
| - |
34 |
| - ```batch |
35 |
| - cd "%~dp0" |
36 |
| - |
37 |
| - msiexec /i RemoteDesktop_x64.msi /qn ALLUSERS=2 MSIINSTALLPERUSER=1 |
38 |
| - ``` |
39 |
| - |
40 |
| - >[!NOTE] |
41 |
| - >The RemoteDesktop_x64.msi installer name must match the MSI contained in the folder. |
| 20 | +- Devices managed by Microsoft Intune or Configuration Manager with permission to add applications. |
42 | 21 |
|
43 |
| -1. Follow the directions in [Prepare Win32 app content for upload](/mem/intune/apps/apps-win32-prepare) to convert the folder into an `.intunewin` file. |
| 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). |
44 | 23 |
|
45 |
| -1. Open the **Microsoft Intune admin center**, then go to **Apps** > **All apps** and select **Add**. |
| 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). |
46 | 25 |
|
47 |
| -1. For the app type, select **Windows app (Win32)**. |
| 26 | +## Install the Remote Desktop client per-user using a PowerShell script |
48 | 27 |
|
49 |
| -1. Upload your `.intunewin` file, then fill out the required app information fields. |
| 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. |
50 | 29 |
|
51 |
| -1. In the **Program** tab, select the install.bat file as the installer, then for the uninstall command use `msiexec /x (6CE4170F-A4CD-47A0-ABFD-61C59E5F4B43)`, as shown in the following screenshot. |
52 |
| - |
53 |
| - :::image type="content" source="./media/install-client-per-user/uninstall-command.png" alt-text="A screenshot of the Program tab. The product code in the Uninstall command field is msiexec /x (6CE4170F-A4CD-47A0-ABFD-61C59E5F4B43)." lightbox="./media/install-client-per-user/uninstall-command.png" ::: |
54 |
| - |
55 |
| -1. Toggle the **Install behavior** to **User**. |
56 |
| - |
57 |
| -1. In the **Detection rules** tab, enter the same MSI product code you used for the uninstall command. |
58 |
| - |
59 |
| -1. Follow the rest of the prompts until you complete the workflow. |
60 |
| - |
61 |
| -1. Follow the instructions in [Assign apps to groups with Microsoft Intune](/mem/intune/apps/apps-deploy) to deploy the client app to your users. |
| 30 | +#### [Intune](#tab/intune) |
62 | 31 |
|
63 |
| -#### [Configuration Manager](#tab/configmanager) |
| 32 | +Here's how to install the client on a per-user basis using a PowerShell script with Intune as a *Windows app (Win32)*. |
64 | 33 |
|
65 |
| -1. Create a new folder in your package share. |
| 34 | +1. Create a new folder on your local Windows device and add the Remote Desktop client MSI file you downloaded. |
66 | 35 |
|
67 |
| -1. In this new folder, add the Remote Desktop client MSI file and an `install.bat` batch file with the following content: |
| 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: |
68 | 37 |
|
69 |
| - ```batch |
70 |
| - msiexec /i RemoteDesktop_x64.msi /qn ALLUSERS=2 MSIINSTALLPERUSER=1 |
| 38 | + ```powershell |
| 39 | + msiexec /i <RemoteDesktop>.msi /qn ALLUSERS=2 MSIINSTALLPERUSER=1 |
71 | 40 | ```
|
72 | 41 |
|
73 |
| - >[!NOTE] |
74 |
| - >The RemoteDesktop_x64.msi installer name must match the MSI contained in the folder. |
| 42 | +1. In the same folder, create a PowerShell script file called `Uninstall.ps1` and add the following content: |
75 | 43 |
|
76 |
| -1. Open the **Configuration Manager** and go to **Software Library** > **Application Management** > **Applications**. |
| 44 | + ```powershell |
| 45 | + $productCode = (Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -eq 'Remote Desktop' -and $_.Vendor -eq 'Microsoft Corporation'}).IdentifyingNumber |
77 | 46 |
|
78 |
| -1. Follow the directions in [Manually specify application information](/mem/configmgr/apps/deploy-use/create-applications#bkmk_manual-app) to create a new application with manually specified information. |
| 47 | + msiexec /x $productCode /qn |
| 48 | + ``` |
79 | 49 |
|
80 |
| -1. Enter the variables that apply to your organization into the **General Information** and **Software Center settings** fields. |
| 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. |
81 | 51 |
|
82 |
| -1. In the Deployment Types tab, select the **Add** button. |
| 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: |
83 | 53 |
|
84 |
| -1. Select **Script Installer** as the deployment type, then select **Next**. |
| 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 | |
85 | 66 |
|
86 |
| -1. Enter the location of the folder you created in step 1 for the **Content location** field. |
| 67 | +#### [Configuration Manager](#tab/configmanager) |
87 | 68 |
|
88 |
| -1. Enter the path of the install.bat file in the **Installation program** field. |
| 69 | +Here's how to install the client on a per-user basis using a PowerShell script with Configuration Manager as a *Script Installer*. |
89 | 70 |
|
90 |
| -1. For the **Uninstall program** field, enter `msiexec /x (6CE4170F-A4CD-47A0-ABFD-61C59E5F4B43)`. |
| 71 | +1. Create a new folder in your content location share for Configuration Manager and add the Remote Desktop client MSI file you downloaded. |
91 | 72 |
|
92 |
| - :::image type="content" source="./media/install-client-per-user/content-location-uninstall-id.png" alt-text="A screenshot of the Specify information about the content to be delivered to target devices window. The command msiexec /x (6CE4170F-A4CD-47A0-ABFD-61C59E5F4B43) is entered into the Uninstall program field ." lightbox="./media/install-client-per-user/content-location-uninstall-id.png" ::: |
| 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: |
93 | 74 |
|
94 |
| -1. Next, enter the same MSI product ID you used for the uninstall command into the **Detection program** field. |
| 75 | + ```powershell |
| 76 | + msiexec /i <RemoteDesktop>.msi /qn ALLUSERS=2 MSIINSTALLPERUSER=1 |
| 77 | + ``` |
95 | 78 |
|
96 |
| - :::image type="content" source="./media/install-client-per-user/msi-product-code.png" alt-text="A screenshot of the Specify how this deployment type is detected window. In the rules box, the clause lists the product ID msiexec /x (6CE4170F-A4CD-47A0-ABFD-61C59E5F4B43)." lightbox="./media/install-client-per-user/msi-product-code.png" ::: |
| 79 | +1. In the same folder, create a PowerShell script file called `Uninstall.ps1` and add the following content: |
97 | 80 |
|
98 |
| -1. For User Experience, toggle the installation behavior to **Install for user**. |
| 81 | + ```powershell |
| 82 | + $productCode = (Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -eq 'Remote Desktop' -and $_.Vendor -eq 'Microsoft Corporation'}).IdentifyingNumber |
99 | 83 |
|
100 |
| -1. Follow the rest of the prompts until you've finished the workflow. |
| 84 | + msiexec /x $productCode /qn |
| 85 | + ``` |
101 | 86 |
|
102 |
| -1. Once you're finished, follow the instructions in [Deploy applications with Configuration Manager](/mem/configmgr/apps/deploy-use/deploy-applications) to deploy the client app to your users. |
| 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. |
103 | 104 |
|
104 | 105 | ---
|
105 | 106 |
|
|
0 commit comments