Skip to content

Reusable PowerShell scripts for Microsoft 365 & Windows management (Intune, Graph, Azure AD, automation, reporting). All examples are sanitized templates—safe to adapt for your environment.

License

Notifications You must be signed in to change notification settings

NerdyOreo/Microsoft_Powershell_Projects

🧠 Microsoft PowerShell Projects

Reusable PowerShell scripts for Microsoft 365, Intune, Azure AD, and Windows automation
Clean, secure, and fully sanitized for public sharing

License: MIT PowerShell Contributions Welcome Security Policy


📘 Overview

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


📁 Repository Structure

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

⚙️ Requirements


🚀 Quick Start

Clone or download the repo:

git clone https://github.com/NerdyOreo/Microsoft_Powershell_Projects.git
cd Microsoft_Powershell_Projects

Run any script in test mode:

# Example: Run a user-device report
.\Get-IntuneUserDeviceReport\Get-IntuneUserDeviceReport.ps1 -WhatIf

🧹 Using the Sanitizer

The 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.


🧰 Recommended Practices

✅ 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.


🤝 Contributing

We welcome improvements! See the Contribution Guidelines for style, testing, and sanitization rules.

  1. Fork this repo
  2. Create a feature branch
  3. Commit your change
  4. Open a Pull Request

🔒 Security

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.


🧭 Community Standards

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

🪪 License

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.

About

Reusable PowerShell scripts for Microsoft 365 & Windows management (Intune, Graph, Azure AD, automation, reporting). All examples are sanitized templates—safe to adapt for your environment.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published