Automate Tenant-Configuration using M365 DSC

In this blog post series I will explain to you how you can automate deploying configurations in the M365 ecosystem with the aid of M365 DSC, a focused implementation of DSC (Desired State Configuration).
First of all, this is a extensive topic, in this post I will only give you a short summary about the Framework and how to maintain the Module and its dependencies.
In later posts I will write deeper about the framework and will show you how to integrate M365 DSC in Azure DevOps.
I’m currently writing my bachelor-thesis about this technology and will share my knowledge about this topic on this blog.

What is M365 DSC?

M365 DSC is a opensource framework developed by the Microsoftcommunity and leaded by Microsoft which enables administrators and engineers in automating Configuration of Microsoft 365 Tenants “the true DevOps-Style”.
It’s the most integrated automation framework for M365 Services and covers all major services such as Entra ID, Exchange Online, Teams, Sharepoint Online, Intune, OneDrive, Security and Compliance and Powerplatform.
It’s for M365 Services, what ARM-Templates are for Azure.

The main target of the framwork is to deliver a tool for IT Department to configure, maintain and monitor M365 environment with more quality and efficiency.
The Framework itself is based on Powershell.

M365 DSC provides the possibility to automate, export, sync, access, monitor and report Tenants.

Requirements

  • Powershell 5.1 and 7.3or higher are supported
  • Valid Credentials or Service Principal with correct permissions (Authentication and Permissions)
  • Be familiar with Powershell
  • Be familiar with M365 Services
  • Be familiar with DSC in general

If you want to integrate M365 DSC with Azure DevOps, it helps to be familiar with Azure DevOps and it’s Subsystems.

How to install

The M365 DSC Module can be installed like any other Powershell Module with following command:
Install-Module Microsoft365DSC
It’s possible that it takes a few minutes to install the whole module.
After that you need to execute the following command:
Update-M365DSCDependencies
That because the required dependencies are not installed with the initial installation, you only get the core components.
For example M365 DSC uses Microsoft Graph Powershell modules and also MSCloudLoginAssistant.

If you want to update the Powershell Module itself, you can execute following command:
Update-Module Microsoft365DSC
Followed by the Dependencies Update Command.

In the next post about M365 DSC I will write about all the features provided by the framework, stay tuned!

Sources used in this post

  • https://microsoft365dsc.com (Pay attention: The source is not 100% up to date. In my diploma-thesis I updated all the outdated informations and will soon share them on mika365.ch)

The author

Mika

Engineer | Blogger | Evangelist

All Posts of the Author

Placeholder

© 2024 Created with ❤ by Mika Kreienbühl