Powershell - What script can I use to show all users and their mailboxes?

Ash DeHart 1 Reputation point

I am working with a client who wants to use exchange Powershell, off prem and not hybrid, to see a list of all of the active users in his organization and the shared mailboxes that they are apart of. To me this does not seem possible all in one script, so even just one command that will list all active users and then another that will show all of the shared mailboxes that those users are apart of, in a list, would be fine.

I understand there is limitations considering he is off prem and not hybrid. But, maybe I am wrong and would love some two sense on the matter.

I was able to find commands of such that are off label and they do not work as expected. I unfortunately do not have the resources to test commands before sending them to my customer either, so if anyone would be so kind to ensure the commands work as expected before sending that would be amazing. Hopefully that is not too much to ask!

Thank you!

Exchange Server Development
Exchange Server Development
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Development: The process of researching, productizing, and refining new or existing technologies.
383 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
6,532 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
4,897 questions
{count} votes