Forum Discussion

Tlu01's avatar
Tlu01
Copper Contributor
Jul 07, 2021
Solved

How to pipe a result from one command to another for Office 365 powershell

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 foun...
  • VasilMichev's avatar
    Jul 07, 2021
    No need to do this in multiple steps, you can use PowerShell's "calculated property" feature:

    Get-MailboxPermission shared “Shared mailbox” | Where-Object { ($_.IsInherited -eq $False) -and -not ($_.User -like “NT AUTHORITY\SELF”) } | select User,@{n="DisplayName";e={(Get-Recipient $_.User).displayName}} | Export-Csv "sharedmailbox.csv" -nti

Resources