powershell Then, install the Exchange Online Management module (one-time setup):
When finished, disconnect cleanly:
| 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" | microsoft 365 cmd
Connect-ExchangeOnline -UserPrincipalName admin@yourdomain.com Once connected, you can run powerful commands directly: the command line is often faster
winget install Microsoft.Graph.CLI Or with npm: and far more powerful.
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.