Exchange - Listing Calendar-delegates for mailboxes
·77 words·1 min
I’ve been troubleshooting an issue where meeting requests are being received by mailboxes/users that are not included in the requests. To get a list of calendar delegates for mailboxes where these are set, I found the following couple of lines quite handy:
$output = [System.Collections.ArrayList]@()
foreach ($_mbx in (Get-Mailbox -ResultSize Unlimited | Get-CalendarProcessing | Where-Object { $_.ResourceDelegates -notlike [string]::Empty })) {
$_mbx.ResourceDelegates | %{
$output.Add(([PSCustomObject]@{
User = $_mbx.Identity;
Delegate = $_.ToString()
})) | Out-Null
}
}
$output