Get-EXOMailboxPermission vs Get-MailboxPermission

Jesus Chao 141 Reputation points
2023-05-02T12:36:25.18+00:00

Hi,

We have an Azure Automation runbook that is getting mailbox permissions in EXO. We have about 4000 mailboxes. When we use Get-ExoMailboxPermission against all the mailboxes, the Azure Automation runbook takes well over 3 hours to complete - which causes the runbook to fail because there is a 3 hour limit on running runbooks. However, if we use the old cmdlet Get-MailboxPermission, it takes about 50 minutes.

Why is there such a huge difference in performance? It's difficult to justify transitioning to EXO cmdlets when it takes 3 times as long. Is anyone else experiencing the same?

Thanks,

Microsoft Exchange Online
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,162 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,237 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Yuki Sun-MSFT 40,916 Reputation points
    2023-05-03T03:09:34.88+00:00

    Hi @Jesus Chao ,

    EXO cmdlets claim to be faster and reliable,(See statement in this link so it doesn't make sense to me either that it took much longer to complete in your case.

    I've also tested in my lab tenant by running the cmdlets below. Although I have only a dozen of mailboxes, per my observation, EXO cmdlets are seemingly a little bit faster than the old one.

     Get-EXOMailbox -ResultSize unlimited | Get-EXOMailboxPermission
    
     Get-Mailbox -ResultSize unlimited | Get-MailboxPermission
    
    

    For your situation, could you try testing by running the two cmdlets exclusively in Windows PowerShell and check how it goes. This might help eliminate the impact of Azure Automation.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.