Nightfall MDM Integration: How to Deploy the Powershell Script for Third-party MDM Windows Machines
Last updated: July 27, 2026
Purpose
When an MDM for Windows machines cannot be integrated with Nightfall, it is required to deploy a script to the machines through MDM to update a registry key. This is the equivalent walkthrough to the macOS Third-Party MDM Integration for Windows.
Environment
Nightfall: MDM Integration
Windows: All Versions
Resolution
Download the "add-upn-to-registry.txt" from this article.
Change the name from a .txt extension to a .ps1 extension.
Open your preferred MDM.
Navigate to where you will upload a script for Windows machines.
Upload the "add-upn-to-registry.ps1" script.
Add the appropriate parameters.
powershell.exe -ExecutionPolicy Bypass -File .\add-upn-to-registry.ps1 -UPN $env:emailDeploy it to a specific target group of Windows machines.
Please test this on a machine or two in a separate group before rolling out fleet-wide!
Download(s)
Additional Notes
The script uses the {EmailAddress} parameter. If your MDM uses a different parameter then this will need changed accordingly. Outside of this parameter, Nightfall is unaware of what your MDM uses.