Microsoft 365 Cmd May 2026

Disconnect-ExchangeOnline For those who prefer a single, cross-platform CLI (works in CMD, bash, or zsh), Microsoft offers the Microsoft Graph CLI ( mgc ). It’s lighter than full PowerShell and doesn’t require a separate scripting environment. Installation (Windows CMD) Run as administrator in CMD:

When most people think of managing Microsoft 365, they picture the web interface—clicking through the Admin center, toggling licenses, and navigating endless menus. But for IT professionals and developers, the command line is often faster, more repeatable, and far more powerful. microsoft 365 cmd

npm install -g @microsoft/microsoft-graph-cli mgc login Once logged in, you can manage almost any aspect of Microsoft 365: But for IT professionals and developers, the command

Install-Module -Name ExchangeOnlineManagement Finally, connect to Microsoft 365: But for IT professionals and developers

winget install Microsoft.Graph.CLI Or with npm:

powershell Then, install the Exchange Online Management module (one-time setup):

When finished, disconnect cleanly: