From 727f9aaf4c6f7413950414643db2fe46483cb40d Mon Sep 17 00:00:00 2001
From: Marko Lisica <83164494+marko-lisica@users.noreply.github.com>
Date: Wed, 26 Feb 2025 00:35:41 +0100
Subject: [PATCH] Update Windows setup guide to include how to turn off MDM
(#26562)
Changes:
- Windows MDM setup guide update: include instructions how to turn off
MDM
- Redirect: new link `learn-more-about/windows-mdm` that will be used in
the error message.
---
articles/windows-mdm-setup.md | 7 +++++++
it-and-security/lib/windows/scripts/turn-off-mdm.ps1 | 2 ++
website/config/routes.js | 1 +
3 files changed, 10 insertions(+)
diff --git a/articles/windows-mdm-setup.md b/articles/windows-mdm-setup.md
index a3b2587229..bd137c30aa 100644
--- a/articles/windows-mdm-setup.md
+++ b/articles/windows-mdm-setup.md
@@ -173,6 +173,13 @@ Once the automatic migration is enabled, Fleet sends a notification to each host
You can track migration progress in Fleet. Learn how [here](https://fleetdm.com/guides/mdm-migration#check-migration-progress).
+## Turn off Windows MDM
+
+1. Turn off MDM for each host, by running [this script](https://github.com/fleetdm/fleet/blob/main/it-and-security/lib/windows/scripts/turn-off-mdm.ps1) on all your Windows hosts.
+2. Head to **Settings > Integrations > MDM**.
+3. In the **Mobile device management (MDM)** section, select **Edit** next to "Windows MDM turned on."
+4. Switch **Windows MDM on** to **Windows MDM off** and select **Save**.
+
diff --git a/it-and-security/lib/windows/scripts/turn-off-mdm.ps1 b/it-and-security/lib/windows/scripts/turn-off-mdm.ps1
index 2ffc3be05d..e78e8f0bc3 100644
--- a/it-and-security/lib/windows/scripts/turn-off-mdm.ps1
+++ b/it-and-security/lib/windows/scripts/turn-off-mdm.ps1
@@ -1,3 +1,5 @@
+# Please don't delete. This script is referenced in the guide here: https://fleetdm.com/guides/windows-mdm-setup#turn-off-windows-mdm
+
Add-Type -TypeDefinition @"
using System;
using System.Runtime.InteropServices;
diff --git a/website/config/routes.js b/website/config/routes.js
index b5499bc036..504c5f613e 100644
--- a/website/config/routes.js
+++ b/website/config/routes.js
@@ -870,6 +870,7 @@ module.exports.routes = {
'GET /learn-more-about/end-user-license-agreement': '/guides/macos-setup-experience#end-user-authentication-and-end-user-license-agreement-eula',
'GET /learn-more-about/end-user-authentication': '/guides/macos-setup-experience#end-user-authentication-and-end-user-license-agreement-eula',
'GET /learn-more-about/policy-templates': '/policies',
+ 'GET /learn-more-about/windows-mdm': '/guides/windows-mdm-setup',
// Sitemap
// =============================================================================================================