Link to home
Start Free TrialLog in
Avatar of Christian Hans
Christian HansFlag 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
ASKER CERTIFIED SOLUTION
Avatar of Danilo Andrade
Danilo Andrade
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial