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