# PowerShellScripting Documentation Site

A collection of PowerShell scripts for enterprise IT administration, covering Active Directory, Microsoft 365, Exchange Online, Entra ID, and Intune management tasks that i've created over the years.

License: GPL v3 PowerShell Gallery Platform

# Table of Contents

  • Table of Contents
    • Script Categories
    • Interactive Scripts
  • Usage
    • Basic Usage
  • Scripts available
    • Active Directory (ad)
    • Exchange / E365 (e365)
    • Entra ID / Azure AD (entra)
    • General utilities (general)
    • Intune (intune)
    • OneDrive / SharePoint (onedrive)
  • Configuration
  • Testing
  • Logging and Troubleshooting
  • Accessibility
  • Contributing
  • Changelog
  • License
  • Like to say thank you?
  • Contact and Support
    • Project Maintainer
    • Getting Help
    • Support Guidelines

# Script Categories

Details of all scripts, and links to their documentation, can be found in the Scripts section below.

  • Active Directory: Scripts for user and computer management in on-premises AD environments
  • Exchange 365: Email and mailbox management for cloud and hybrid environments
  • Entra ID: Identity and access management for Azure AD/Entra ID
  • General: Utility scripts for common administrative tasks
  • Intune: Detection and remediation scripts to keep your house in order
  • Microsoft 365: Microsoft 365 Relevant scripts
  • Onedrive: Onedrive for Business and SharePoint bulk file upload/download scripts

# Interactive Scripts

Many scripts include GUI interfaces for ease of use:

  • User creation wizards with form-based input
  • Device selection interfaces
  • Progress indicators for long-running operations

# Usage

# Basic Usage

Each script is designed to be run independently. Navigate to the appropriate folder and execute the script:

# Example: Run user creation script
.\ad\user\creation\User-Creation.ps1

# Example: Run Intune bulk sync
.\intune\devices\Intune-BulkSync.ps1

# Scripts available

# Active Directory (ad)

Script Summary Documentation
ad/computer/FindMachineOU.ps1 Locates the organisational unit (OU) for a given computer in Active Directory. FindMachineOU
ad/user/creation/AD-CopyGroups.ps1 Copies group memberships from one AD user to another. AD-CopyGroups
ad/user/creation/User-Creation-Bulk.ps1 Bulk creation of AD users from a CSV file. User-Creation-Bulk
ad/user/creation/User-Creation.ps1 Creates a new AD user with a GUI interface. User-Creation
ad/user/creation/User-Departure.ps1 Processes the departure of an AD user, disabling and archiving the account. User-Departure
ad/user/reconcillation/Employee-Departure-Reconciliation.ps1 Reconciles all departed employees against AD from a HR provided file, and provides notifications where follow up actions are needed. Employee-Departure-Reconciliation
ad/user/reconcillation/Employee-Listing.ps1 Lists employees in AD for reporting or reconciliation. Employee-Listing

# Exchange / E365 (e365)

Script Summary Documentation
e365/E365-Mailbox-ConvertToShared.ps1 Converts a user mailbox to a shared mailbox in Exchange Online. E365-Mailbox-ConvertToShared
e365/E365-Quarantine-ExportRecord.ps1 Exports quarantine records from Exchange Online. E365-Quarantine-ExportRecord
e365/Exchange-QuarantineTABL-DataDownload.ps1 Downloads quarantine data from Exchange Online for analysis. Exchange-QuarantineTABL-DataDownload
e365/NewTransportRuleExecName.ps1 Creates or manages Exchange Online transport rules. NewTransportRuleExecName

# Entra ID / Azure AD (entra)

Script Summary Documentation
entra/AutomateCompromisedAccountRemediation.ps1 Automates remediation steps for compromised Entra ID (Azure AD) accounts. AutomateCompromisedAccountRemediation
entra/Entra-UserExternal-Create.ps1 Creates an external user in Entra ID (Azure AD). Entra-UserExternal-Create
entra/User-Management-External.ps1 Manages external users in Entra ID (Azure AD). User-Management-External

# General utilities (general)

Script Summary Documentation
general/ScriptSelector.ps1 Provides an interactive menu to select and launch other scripts. ScriptSelector
general/module-management/Module-PowerShell7-Require.ps1 Ensures required PowerShell 7 modules are installed and imported. Module-PowerShell7-Require
general/module-management/Update-Module.ps1 Updates specified PowerShell modules to the latest version. Update-Module
general/password-generation/Password-Generator-Silent.ps1 Generates a password silently for use in automation. Password-Generator-Silent
general/password-generation/Password-Generator.ps1 Generates a password with user interaction or options. Password-Generator

# Intune (intune)

Script Summary Documentation
intune/devices/Intune-BulkSync.ps1 Performs bulk synchronisation of devices in Microsoft Intune. Intune-BulkSync
M365-Version — DetectRemediate M365 Apps version detection and remediation. M365-Version
Teams-Old — DetectRemediate Legacy Teams detection and remediation. Teams-Old
WinUpdate-23H2to24H2Force — DetectRemediate Detect and remediate readiness for forced Windows update. WinUpdate-23H2to24H2Force
WinUpdate-Outstanding — DetectRemediate Windows Update detection and remediation. WinUpdate-Outstanding
WinUpdate-Pause — DetectRemediate Windows Update pause detection and remediation. WinUpdate-Pause
Win-Storage — DetectRemediate Detect and remediate low storage space on Windows devices. Win-Storage

# OneDrive / SharePoint (onedrive)

Script Summary Documentation
onedrive/onedrive-sharepont-uploaddownload.md Information on best way to bulk upload and download content from OneDrive OneDrive upload/download

# Configuration

See the dedicated configuration page for environment variables, authentication notes and common customisations:

# Testing

See the testing page for validation guidance and pre-production checks:

# Logging and Troubleshooting

See the logging and troubleshooting page for standards, common issues and support resources:

# Accessibility

See the accessibility page for details on inclusive design and accessibility practices:

# Contributing

See the contribution guidelines and development checklist:

# Changelog

See the project changelog and recent changes:

# License

This project is licensed under the GNU General Public License v3.0 — see the LICENSE file for full terms and conditions.

Copyright (c) 2025, Michael Harris, All rights reserved.

# Like to say thank you?

If these scripts have helped you in your IT administration tasks, consider:

  • Starring this repository
  • 🐛 Reporting issues or suggesting improvements
  • 📖 Contributing to the documentation
  • Buy me a coffee to support continued development

# Contact and Support

# Project Maintainer

# Getting Help

  • Issues: Report bugs or request features via GitHub Issues
  • Discussions: Join the conversation in GitHub Discussions
  • Documentation: Review script headers and Microsoft documentation links

# Support Guidelines

  • Provide clear descriptions of issues with relevant log files
  • Include PowerShell version and module information
  • Specify the target environment (on-premises, cloud, hybrid)
  • Follow the issue templates when reporting problems

This project makes reasonable efforts to follow Microsoft PowerShell best practices and maintains compatibility with enterprise IT environments.