powershell Then connect to Microsoft 365:
m365 login m365 status m365 aad user list Get group members m365 aad o365group member list --groupId "group-id" Send email via Graph m365 outlook mail send --to "user@domain.com" --subject "Test" --body "Hello from CLI" 6. One-Liner Scripts (Batch + PowerShell) Save as m365_manage.cmd : office365 cmd
Save this post as a cheat sheet and adapt the commands to your tenant. powershell Then connect to Microsoft 365: m365 login