Avatar of Christian Hans
Christian Hans
Flag for United States of America asked on

Export users with access to other mailboxes

Morning all,

I am looking for a command or script that will allow me to export a csv showing the mailbox in one column, then in the next column(s) show names of the users that have access to said mailbox.

I've been trying to alter this one that I found online, with no luck, the User field is blank:

$a = Get-Mailbox -ResultSize Unlimited
$a | Get-MailboxPermission | Where { ($_.IsInherited -eq $False) -and -not ($_.User -like “NT AUTHORITY\SELF”) -and -not ($_.User -like '*Discovery Management*') } | Select Identity,@{name="User";expression={(Get-User $_.User).User}},AccessRights | Export-CSV c:\Temp\output.csv -NoTypeInformation
PowershellExchange

Avatar of undefined
Last Comment
Danilo Andrade

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Danilo Andrade

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck