Skip to content

Commit 7b3f30b

Browse files
ranbeldeadlypants1973
authored andcommitted
[ZT] Push mdm.xml to Windows devices with Intune (cloudflare#22919)
* push mdm.xml with intune * overwrites the old file * Apply suggestions from code review Co-authored-by: Kate Tungusova <[email protected]> * Update intune.mdx --------- Co-authored-by: Kate Tungusova <[email protected]>
1 parent 2a429cf commit 7b3f30b

File tree

2 files changed

+90
-19
lines changed
  • src/content/docs/cloudflare-one/connections/connect-devices/warp/deployment/mdm-deployment

2 files changed

+90
-19
lines changed

src/content/docs/cloudflare-one/connections/connect-devices/warp/deployment/mdm-deployment/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ IdentifyingNumber Name LocalPackage
5757
msiexec /x C:\WINDOWS\Installer\<WARP_RELEASE>.msi /quiet
5858
```
5959

60-
### Update the configuration
60+
### Update MDM parameters
6161

6262
The on-disk configuration of the Windows client can be changed at any time by modifying or replacing the contents of `C:\ProgramData\Cloudflare\mdm.xml`. The format of this file is as follows:
6363

src/content/docs/cloudflare-one/connections/connect-devices/warp/deployment/mdm-deployment/partners/intune.mdx

Lines changed: 89 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,101 @@ This guide covers how to deploy the Cloudflare WARP client using Microsoft Intun
1010

1111
## Windows
1212

13-
### Prerequisites
14-
15-
[Download the `Cloudflare_WARP_<VERSION>.msi` installer](/cloudflare-one/connections/connect-devices/warp/download-warp/#windows).
16-
17-
### Configure Intune for Windows
18-
19-
1. Log in to your Microsoft Intune account.
20-
2. Go to **Apps** > **All Apps** > **Add**.
21-
3. In **App type**, select *Line-of-business app* from the drop-down menu. Select **Select**.
22-
4. Select **Select app package file** and upload the `Cloudflare_WARP_<VERSION>.msi` installer you downloaded previously.
23-
5. Select **OK**.
24-
6. In the **Name** field, we recommend entering the version number of the package being uploaded.
25-
7. In the **Publisher** field, we recommend entering `Cloudflare, Inc`.
26-
8. In the **Command-line arguments** field, enter a valid installation command. For example,
13+
### Deploy the WARP client
14+
15+
To deploy WARP on Windows using Intune:
16+
17+
1. [Download the `Cloudflare_WARP_<VERSION>.msi` installer](/cloudflare-one/connections/connect-devices/warp/download-warp/#windows).
18+
2. Log in to your Microsoft Intune account.
19+
3. Go to **Apps** > **All Apps** > **Add**.
20+
4. In **App type**, select *Line-of-business app* from the drop-down menu. Select **Select**.
21+
5. Select **Select app package file** and upload the `Cloudflare_WARP_<VERSION>.msi` installer you downloaded previously.
22+
6. Select **OK**.
23+
7. In the **Name** field, we recommend entering the version number of the package being uploaded.
24+
8. In the **Publisher** field, we recommend entering `Cloudflare, Inc`.
25+
9. In the **Command-line arguments** field, enter a valid installation command.
26+
For example:
2727
```txt
2828
/qn ORGANIZATION="your-team-name" SUPPORT_URL="http://support.example.com"
2929
```
30-
Refer to [deployment parameters](/cloudflare-one/connections/connect-devices/warp/deployment/mdm-deployment/parameters/) for a description of each argument.
31-
9. Select **Next**.
32-
10. Add the users or groups who require Cloudflare WARP and select **Next**.
33-
11. Review your configuration and select **Create**.
30+
Refer to [deployment parameters](/cloudflare-one/connections/connect-devices/warp/deployment/mdm-deployment/parameters/) for a description of each argument. You can change these parameters at any time by pushing a new [MDM file](#update-mdm-parameters).
31+
10. Select **Next**.
32+
11. Add the users or groups who require Cloudflare WARP and select **Next**.
33+
12. Review your configuration and select **Create**.
3434

3535
Intune is now configured to deploy the WARP client.
3636

37+
### Update MDM parameters
38+
39+
You can use Intune to update [MDM parameters](/cloudflare-one/connections/connect-devices/warp/deployment/mdm-deployment/parameters/) for the WARP client. On Windows, these parameters are stored on the local device in `C:\ProgramData\Cloudflare\mdm.xml`.
40+
41+
To push a new `mdm.xml` file using Intune:
42+
43+
1. Log in to your Microsoft Intune account.
44+
2. Go to **Devices** > **Scripts and remediations**.
45+
3. Select the **Platform scripts** tab and select **Add**.
46+
4. Select **Windows 10 and later**.
47+
5. Enter a name for the script (for example, `Deploy Cloudflare mdm.xml`).
48+
6. In **PowerShell script**, upload the following `.ps1` file. Be sure to modify the XML content with your desired [parameters](/cloudflare-one/connections/connect-devices/warp/deployment/mdm-deployment/parameters/).
49+
50+
```powershell title="mdm-template.ps1"
51+
# Define the path to the file
52+
$filePath = "C:\ProgramData\Cloudflare\mdm.xml"
53+
54+
# Create the XML content as a string
55+
$xmlContent = @"
56+
<dict>
57+
<key>multi_user</key>
58+
<true/>
59+
<key>pre_login</key>
60+
<dict>
61+
<key>organization</key>
62+
<string>mycompany</string>
63+
<key>auth_client_id</key>
64+
<string>88bf3b6d86161464f6509f7219099e57.access</string>
65+
<key>auth_client_secret</key>
66+
<string>bdd31cbc4dec990953e39163fbbb194c93313ca9f0a6e420346af9d326b1d2a5</string>
67+
</dict>
68+
<key>configs</key>
69+
<array>
70+
<dict>
71+
<key>organization</key>
72+
<string>mycompany</string>
73+
<key>display_name</key>
74+
<string>Production environment</string>
75+
</dict>
76+
<dict>
77+
<key>organization</key>
78+
<string>test-org</string>
79+
<key>display_name</key>
80+
<string>Test environment</string>
81+
</dict>
82+
</array>
83+
</dict>
84+
"@
85+
86+
# Ensure the directory exists
87+
$directory = Split-Path $filePath -parent
88+
if (-not (Test-Path $directory)) {
89+
New-Item -ItemType Directory -Path $directory | Out-Null
90+
}
91+
92+
# Write the XML content to the file
93+
try {
94+
$xmlContent | Out-File -Encoding UTF8 -FilePath $filePath
95+
Write-Host "mdm.xml file created successfully at: $filePath"
96+
}
97+
catch {
98+
Write-Error "Failed to create mdm.xml file: $_"
99+
}
100+
```
101+
7. In **Assignments**, select the Windows devices that should receive the new `mdm.xml` file.
102+
8. To deploy the script, select **Add**.
103+
104+
Intune will now execute the Powershell script on the target devices and overwrite the previous `mdm.xml` file. Once the new `mdm.xml` file is created, WARP will immediately start using the new configuration.
105+
106+
If you prefer to use Intune's Win32 App tool to run the Powershell script, refer to the [Intune documentation](https://learn.microsoft.com/en-us/mem/intune/apps/apps-win32-app-management).
107+
37108
## macOS
38109

39110
Refer to the [generic instructions for macOS](/cloudflare-one/connections/connect-devices/warp/deployment/mdm-deployment/#macos).

0 commit comments

Comments
 (0)