Forum Discussion

Bilalladoui's avatar
Bilalladoui
Copper Contributor
Jan 13, 2021

How to get list of users " Send As " for shared mailbox using PowerShell

Hi,

I would like to pull out the list of users " Send As " for a specific Shared mailbox, using Exchange PowerShell. 

4 Replies

  • boneyfrancis's avatar
    boneyfrancis
    Iron Contributor
    The SendAs permission is granted using Add-RecipientPernission, so to retrieve the list of users who has permission to send as the shared mailbox, you can run:
    Get-RecipientPermission -Identity <SharedMailbox>
    OR
    Get-RecipientPermission -Identity <SharedMailbox> | Select Trustee, AccessRights
    • Bilalladoui's avatar
      Bilalladoui
      Copper Contributor
      I getting this error :

      Get-RecipientPermission : The term 'Get-RecipientPermission' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included,
      verify that the path is correct and try again.
      • boneyfrancis's avatar
        boneyfrancis
        Iron Contributor

        Apologies, presumed you were already connected to Exchange Online remote powershell. To run any powershell cmdlets against O365, you'll first need to connect to the respective endpoint. In this case, you'll need to connect to Exchange Online first, refer this doc: https://docs.microsoft.com/en-us/powershell/exchange/connect-to-exchange-online-powershell?view=exchange-ps

         

        Once connected, you'll be able to run Get-RecipientPermission / Get-ExoRecipientPermission (if you installed the EXO V2 module)

Resources