Export M365 tenant configuration as PowerShell DSC for Git version control. 15 workloads supported.
Related topics
m365dsc
powershell dsc
tenant configuration
infrastructure as code
configuration management
About this tool
The M365DSC Export tool generates Microsoft365DSC PowerShell scripts that capture your complete tenant configuration. Export 8 Graph-based workloads and 7 PowerShell-based workloads as Infrastructure-as-Code.
Perfect for version control workflows - commit your tenant configuration to Git and track changes over time. Use Azure DevOps or GitHub Actions to detect configuration drift and automatically remediate.
The generated DSC scripts can recreate your tenant configuration in a new environment or serve as authoritative documentation of your settings.
Key features
Export 15 workloads (8 Graph + 7 PowerShell)
Generate PowerShell DSC scripts
Git-ready configuration files
Support for Azure DevOps pipelines
Drift detection capabilities
Configuration comparison tools
Selective workload export
Documentation generation
Use cases
Configuration as Code. Manage M365 configuration through Git workflows
Change tracking. Document and audit configuration changes over time
Environment cloning. Replicate configuration between dev/test/prod tenants
Requires a paid edition (config). The Suite bundle includes this tool alongside every other capability in the catalogue.
Limitations & out-of-scope
Only 3 of the 15 documented workloads run through Graph scopes (Policy.Read.All, Directory.Read.All, Organization.Read.All); the other 7 PowerShell-based workloads require the operator's own authenticated Exchange Online / SharePoint Online PowerShell session with matching admin roles — this tool does not carry credentials for those sessions. The output is a DSC script, not a live configuration change: applying it back to a tenant is a separate Microsoft365DSC run the operator initiates and reviews.