Skip to main content
This section of the PowerShell Toolkit covers scripts for managing Windows and macOS devices through Microsoft Intune (Microsoft Endpoint Manager). Scripts are organized by function — from enforcing device configuration through Proactive Remediations to deploying Win32 applications. All scripts are provided for educational purposes. Review and test each script before deploying to production.
Always test scripts against a non-production or pilot device group before broad deployment. Some scripts modify registry keys, uninstall software, or create local accounts — changes that may be difficult to reverse at scale.

Accessing Microsoft Endpoint Manager

All Intune policy and script management is performed through the Microsoft Intune admin center: Portal: https://endpoint.microsoft.com/ From the portal you can access:
  • Devices — device inventory, compliance status, and configuration profiles
  • Apps — Win32 app packaging and deployment
  • Endpoint security — compliance policies and custom compliance scripts
  • Reports > Endpoint analytics > Proactive Remediations — detection and remediation script pairs

What’s in this toolkit

Windows

The Windows section is organized into the following subsections:
SectionDescription
Proactive RemediationsDetection + remediation script pairs run by Endpoint Analytics
Compliance ScriptsCustom compliance detection scripts for third-party security agents
Device ScriptsOne-time PowerShell scripts deployed to devices
Win32 AppsInstall and uninstall scripts for Win32 app packaging
Security BaselinesBaseline configuration references

macOS

The macOS section covers shell scripts deployed via Intune’s Device Scripts feature. macOS scripts use bash/shell rather than PowerShell and are executed in a different context from Windows scripts.

Proactive Remediations

Detection and remediation script pairs for automated issue detection and self-healing on Windows devices.

Compliance Scripts

Custom compliance detection scripts for third-party security agents including Cisco Umbrella, Netskope, and Zscaler.

Win32 App Deployment

PowerShell install and uninstall scripts for Win32 app deployment, including Azul Zulu JRE, SnagIT 2024, and Datto RMM.

macOS Management

Shell scripts and guidance for managing macOS devices through Microsoft Intune.

Build docs developers (and LLMs) love