A curated collection of PowerShell remediation scripts for Windows devices, designed to be deployed via Microsoft Intune Proactive Remediations.
This repository focuses on security drift correction, ensuring endpoints remain compliant with defined baselines and Zero Trust principles.
Modern endpoint environments drift.
Even with strong baselines, devices can become non-compliant over time due to:
- User changes
- Application behavior
- OS inconsistencies
- Policy gaps
This repository provides automated remediation scripts to bring devices back into a secure and compliant state.
These scripts are intended for:
- Microsoft Intune (Remediation Scripts)
- Cloud-native / Entra ID joined devices
- Continuous compliance monitoring
Each remediation follows a consistent pattern:
- Checks current state
- Returns:
0= Compliant1= Non-compliant
- Applies required fix
- Logs actions
- Returns:
0= Success1= Failed
Scripts in this repository cover:
- BitLocker
- Firewall
- Code Integrity
- Antivirus
- Antimalware
- Real-time protection
- Defender engine version
- Go to Microsoft Intune Admin Center
- Navigate to: Reports → Endpoint Analytics → Proactive Remediations
- Create a new remediation:
- Upload
Detect.ps1 - Upload
Remediate.ps1
- Assign to device group
- Configure schedule
- Idempotent → Safe to run multiple times
- Minimal impact → No unnecessary changes
- Transparent → Clear logging and output
- Secure by default → Align with Zero Trust
- Cloud-native first → No legacy dependencies
Compliance policies alone only detect issues.
Remediation ensures:
- Faster recovery from drift
- Reduced operational overhead
- Improved security posture
- Better user experience
- Always test scripts in pilot groups
Contributions are welcome.
When adding new scripts:
- Follow the standard structure
- Include documentation
- Keep scripts clean and readable
- Avoid environment-specific dependencies
These scripts are provided as-is.
Test thoroughly before deploying to production environments.
This project is inspired by the need for continuous compliance, similar in spirit to tools like:
- HardeningKitty (Windows baseline validation)
Simon Eriksen
Cloud Architect | Microsoft MVP
Focused on Intune, Security, and Modern Endpoint Management
If you find this useful:
- Star the repo
- Share feedback
- Contribute improvements