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

Ash DeHart 1 Reputation point
2022-04-22T16:36:21.657+00:00

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.
540 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.
7,583 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.
5,504 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.