Reusable PowerShell scripts for Microsoft 365, Intune, Azure AD, and Windows automation
Clean, secure, and fully sanitized for public sharing
This repository contains production-tested PowerShell scripts and patterns for Microsoft ecosystem administration:
- Microsoft Intune & Endpoint Manager
- Entra ID / Azure Active Directory
- Microsoft Graph API automation
- Windows configuration and remediation
All scripts are sanitized templates — any company-specific identifiers, credentials, or private information have been removed using the included tool:
Sanitize-Scripts.ps1
| Folder | Description |
|---|---|
| Get-IntuneUserDeviceReport | Generate reports mapping users ⇄ devices from Intune and Entra ID |
| Intune Intranet Rollout | Example rollout/deployment pattern for intranet or LOB content |
| KofaxDetection | Intune detection script structure for verifying app installs |
| RingCentral_Deployment | Intune deployment script for silently installing RingCentral via PowerShell |
| Sanitize-Scripts.ps1 | Utility to remove company or personal data from .ps1 files |
| Uninstall_AdobePDF | Software remediation/uninstall template |
| SharePoint_Device_Inventory_Automation | Automates creation of a SharePoint list for device inventory tracking using PnP.PowerShell |
| README.md | Main documentation |
| LICENSE | MIT license |
| CONTRIBUTING.md | Contribution guidelines |
| CODE_OF_CONDUCT.md | Contributor behavior standards |
| SECURITY.md | Responsible disclosure and privacy policy |
- PowerShell 7.x (recommended) or Windows PowerShell 5.1
- Execution Policy:
RemoteSignedorBypass - Modules:
- Microsoft.Graph
- PSScriptAnalyzer (for linting)
Clone or download the repo:
git clone https://github.com/NerdyOreo/Microsoft_Powershell_Projects.git
cd Microsoft_Powershell_ProjectsRun any script in test mode:
# Example: Run a user-device report
.\Get-IntuneUserDeviceReport\Get-IntuneUserDeviceReport.ps1 -WhatIfThe included Sanitize-Scripts.ps1 ensures no private data appears in your code before publishing.
# Sanitize specific files
.\Sanitize-Scripts.ps1 -Files @(
"C:\Scripts\MyScript.ps1"
) -OutputDir "C:\Scripts\Sanitized_PS1"
# Sanitize entire folder
.\Sanitize-Scripts.ps1 -Path "C:\Scripts" -Recurse -OutputDir "C:\Scripts\Sanitized_PS1"
# Dry run
.\Sanitize-Scripts.ps1 -Path "C:\Scripts" -Recurse -WhatIf -OutputDir "C:\Scripts\Sanitized_PS1"Outputs include a .sanitized.ps1 copy and .mapping.json/.csv replacement maps.
✅ Always test scripts in a non-production environment first.
✅ Use -WhatIf and -Confirm:$false for safe execution.
✅ Follow PowerShell style guidelines (see CONTRIBUTING.md).
✅ Run PSScriptAnalyzer before pushing changes.
✅ Review and sanitize code before publication.
We welcome improvements! See the Contribution Guidelines for style, testing, and sanitization rules.
- Fork this repo
- Create a feature branch
- Commit your change
- Open a Pull Request
If you find any credential, domain, or sensitive information in the code, please report it privately via the instructions in the Security Policy. Do not open public issues for security-related reports.
| File | Purpose |
|---|---|
| LICENSE | MIT license for open use |
| CODE_OF_CONDUCT.md | Contributor expectations |
| CONTRIBUTING.md | How to safely contribute |
| SECURITY.md | Responsible disclosure policy |
| .gitignore | Excludes temp/log/sanitized files |
| .gitattributes | Normalizes line endings and diffs |
This project is licensed under the MIT License — see LICENSE for details. © 2025 Tyler Gates
💙 Built for the PowerShell community — secure, clean, and ready to automate.