Search code examples
powershellexchangewebservices

Exchange online can I get a list of all mailboxes


I need to get a list of all mailboxes.

Can I get this list with EWS and PowerShell?

Exchange online shell will not be installed on the server where I run the script.

Thanks for your support


Solution

  • With PowerShell you can just simple call the Get-MailBox powershell command. enter image description here

    This is working for on-premise and O365 mailboxes as well. For O365 environment sooner or later you will need to transfer to modern authentication, but basic authentication will still work for a while. This is the easier way of I can think of.

    Based on my knowledge it's not possible to list all mailboxes using entirely with EWS.