$ show admindroid-community/powershell-scripts
This repository is a large collection of standalone PowerShell scripts for Microsoft 365 administration, reporting, auditing, and management. It contains over 100 scripts covering tasks such as exporting mailbox sizes, auditing file deletions, managing licenses, monitoring sign-ins, configuring email signatures, and cleaning up SharePoint version history. Each script is self-contained in its own folder with a README, and they are designed to be run manually or scheduled via Task Scheduler. The scripts heavily rely on Microsoft Graph, Exchange Online Management, PnP.PowerShell, and Teams PowerShell modules, with many supporting certificate-based authentication for unattended execution. Output is almost exclusively CSV files saved locally. The repository also includes several CSV lookup files (e.g., LicenseFriendlyName.csv) that map internal SKU IDs to human-readable product names, which are reused across multiple scripts. Despite the breadth of functionality, the codebase suffers from significant quality issues. There is extensive code duplicationβconnection logic, module installation, CSV export, and file-open popups are copy-pasted across nearly every script. Many scripts use deprecated modules like MSOnline or rely on Microsoft Graph beta endpoints, creating maintenance risks. Typos, inconsistent variable naming, and hardcoded paths are common. The repository also serves as a marketing funnel for AdminDroid, with promotional banners and links embedded in every script. There is no shared library, no version control for dependencies, no tests, and no CI/CD. The overall architecture is a loose collection of one-off utilities rather than a cohesive application. For an AI agent or engineer evaluating reuse, the most valuable assets are the connection helper patterns (e.g., ConnectMgGraph.ps1) and the license-friendly-name CSV files, which can be extracted and adapted for other M365 automation projects. However, the majority of scripts are tightly coupled to the specific reporting patterns and promotional content of this repository, making direct reuse without significant refactoring impractical.
The LLM identified 3 files worth highlighting for reuse:
A self-contained PowerShell script that handles connecting to Microsoft Graph with multiple authentication methods (interactive MFA, certificate-based, and credential-based). It checks for the required Microsoft.Graph module, prompts to install if missing, and establishes the session. This pattern is reusable across any M365 automation project that needs Graph connectivity, and it demonstrates a clean fallback authentication flow.
A standalone script for installing (if missing) and connecting to Exchange Online PowerShell using the ExchangeOnlineManagement module. It supports both interactive and certificate-based authentication. The script is a reusable bootstrap for any script that needs to run Exchange Online cmdlets, and it encapsulates the module management logic cleanly.
A CSV file containing mappings from Microsoft 365 license string IDs (e.g., 'ENTERPRISEPACK') to human-readable product names (e.g., 'Office 365 E3'). This is a reusable data asset that can be loaded by any PowerShell script or tool to translate internal SKU identifiers into user-friendly names for reports or license management. It is used by multiple scripts in the repository and can be easily adapted for other projects.