Dennis,
The issue really seems to be in Get-ADPermission. It is the only cmdlet that takes so much time to execute.
The thing is that the Get-ADPermission cmdlet gets permissions for the mailbox. Each user that has certain permissions for the mailbox is stored in the form of a Security Identifier (SID). The Get-ADPermission cmdlet translates the SIDs into names of the users/groups that have the permissions. This can take some time in certain situations.
To troubleshoot the issue, can you do the following:
-
Logon to the Exchange Server that is mentioned in the trace file.
-
Launch Exchange Management Shell (EMS).
-
Execute the Get-ADPermission cmdlet exactly as it is shown in the trace file, piping the output to a CSV file. For example:
Get-ADPermission -Identity "CN=User,CN=Users,DC=example,DC=com" -DomainController "server.example.com" | Export-CSV C:\Export.csv
where C:\Export.csv is the full path to the CSV file that will be created.
-
Send the generated CSV file to us.