Listing Delegates - Specific User

We are trying to write a script that will go through all mailboxes or all mailboxes in a database to find out which mailboxes a certain user has Calendar access rights to. Just can't seem to display the mailbox along with the access rights.

$User = Get-Mailbox -Database "" -ResultSize Unlimited

$User | ForEach {Get-MailboxFolderPermission -identity "$($_.PrimarySmtpAddress):\Calendar"} | Where {$_.User.ToString() -eq "Test, User"} | FT $User,Folder,AccessRights

The output is missing the mailbox that is queried. How can we get that included in the output as

April 13th, 2015 12:33pm

caught my own simple oversight:

$User | ForEach {Get-MailboxFolderPermission -identity "$($_.PrimarySmtpAddress):\Calendar"} | Where {$_.User.ToString() -eq "Test, User"} | FT Identity,AccessRights

Free Windows Admin Tool Kit Click here and download it now
April 13th, 2015 12:51pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics