Skip to content

M365 Toolkit

A collection of PowerShell scripts for Microsoft 365 administrators.

Getting Started

Download Scripts

  1. Clone or download the repository:

    git clone https://github.com/emildosen/m365-toolkit.git
    

  2. Navigate to the scripts/ folder and run scripts directly:

    cd m365-toolkit/scripts
    .\entra\Export-ConditionalAccessReport.ps1
    

Standalone Scripts

Each script page in this documentation includes a Full Script section with all helper functions inlined. You can copy the complete standalone script and run it anywhere without needing the helper files.

Requirements

Scripts require the following PowerShell modules. Scripts will use either Graph or PnP, not both simultaneously.

Module Version Purpose
Microsoft.Graph 2.34.0+ Microsoft Graph API
PnP.PowerShell 3.1.0+ SharePoint API
ImportExcel 7.8.10+ Excel export functionality

Install dependencies:

Install-Module Microsoft.Graph -Scope CurrentUser -Force
Install-Module PnP.PowerShell -Scope CurrentUser -Force
Install-Module ImportExcel -Scope CurrentUser -Force

Getting Help

Each script includes comment-based help. Use PowerShell's built-in help system:

# Get help for a script
Get-Help .\entra\Export-ConditionalAccessReport.ps1 -Full