Microsoft 365 Cmd ~repack~ -
powershell Then, install the Exchange Online Management module (one-time setup):
Open CMD, type powershell , and run Connect-ExchangeOnline . You’ll never look at the web admin portal the same way again. Have a favorite Microsoft 365 command-line trick? Share it with the community below.
winget install Microsoft.Graph.CLI Or with npm: microsoft 365 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.
| Task | Command | |------|---------| | List all users | Get-User -ResultSize Unlimited | | Show mailbox details | Get-Mailbox -Identity "user@domain.com" | | Assign a license | Set-MsolUserLicense -UserPrincipalName "user@domain.com" -AddLicenses "domain:ENTERPRISEPACK" | | Create a new user | New-MsolUser -UserPrincipalName "newuser@domain.com" -DisplayName "New User" -Password "TempPass123" | Share it with the community below
Install-Module -Name ExchangeOnlineManagement Finally, connect to Microsoft 365:
npm install -g @microsoft/microsoft-graph-cli mgc login Once logged in, you can manage almost any aspect of Microsoft 365: | Task | Command | |------|---------| | List
When finished, disconnect cleanly: