Jul 06 2021 08:54 PM
I need to show the name of users with full permission access to a shared mailbox. I found the script to export the user list, however it only shows the user ID in O365, not the Display name. I found another script that can convert the user ID to Display name. How can I link them together so I don't have to run two separate scripts to get the final result?
Script one to export out the User ID:
Get-MailboxPermission “Shared mailbox” | Where-Object { ($_.IsInherited -eq $False) -and -not ($_.User -like “NT AUTHORITY\SELF”) } | Select-Object user | Export-Csv "sharedmailbox.csv"
Script two to convert the user ID to Display Name:
Import-Csv "sharedmailbox.csv" | foreach{Get-Mailbox -ResultSize Unlimited -Identity $_.user} | select *DisplayName* | Export-csv "sharedmailbox-Displayname.csv"
Thank you.
Jul 06 2021 10:23 PM
Jul 06 2021 10:43 PM
SolutionJul 07 2021 07:06 AM
Thank you for the suggestion.
Jul 07 2021 07:08 AM
Jul 06 2021 10:43 PM
Solution