Exchange Folder Permissions - query users access to all calendars

I'm trying to get a script working without any success which I'm hoping someone will already have a similar one for I could take.

Basically it needs to run a command like get-mailboxfolderpermissions -identity user:\calendar -user username >> c:\results.text

Basically I need it to check all accounts in the exchange server for a specific account with permissions over its calendar. So in essence check all folder calendar permissions for all mailboxes and if it matches -user, then wrote back to a file the calendar samaccountname they have access to.

Seems long winded but the only way in outlook 2010 to check what permissions a user has over all other calendars that are not provided via full access or inherited permissions.

Ideas appreciated.

Thanks


  • Edited by Tarrley 12 hours 11 minutes ago More descriptive
September 1st, 2015 2:49pm

What is it that you are trying to ask? Just ask a plain question.  Don't try to explain it.

Free Windows Admin Tool Kit Click here and download it now
September 1st, 2015 3:18pm

Use Get-Mailbox and pipe into ForEach-Object. Run your permission check inside the loop. This should only take a few lines to complete

As always, you can check the repository for starting points:

http://gallery.technet.microsoft.com/scriptcenter

September 1st, 2015 3:19pm

This is all good and thank you, however it doesn't return the account the permission is then set on.

Basically I want to be able to enter username1 and have a list of any calendar mailbox folder that username has access to. 

Free Windows Admin Tool Kit Click here and download it now
September 1st, 2015 3:21pm

This is all good and thank you, however it doesn't return the account the permission is then set on.

Basically I want to be able to enter username1 and have a list of any calendar mailbox folder that username has access to. 

I'm not sure what you mean by this. You can return whatever you want if you find a match.

We'll likely need to see your script and what's wrong with it before we can offer more concrete help.

September 1st, 2015 3:24pm

You are asking about "effective access" by user.  There is no tool for doing that in Exchange 2010.  You must check every group and all subgroups for the user account.

Free Windows Admin Tool Kit Click here and download it now
September 1st, 2015 3:33pm

I went digging in my script vault and found something that you can use as a starter:

$userToCheck = Read-Host 'Enter username'

$mbxs = Get-Mailbox

foreach ($mbx in $mbxs) {

    $calendarPermissions = Get-MailboxFolderPermission "$($mbx.Name):\Calendar"

    foreach ($permissionEntry in $calendarPermissions) {

        If ($permissionEntry.User.ADRecipient.SamAccountName -eq $userToCheck) {

            Write-Host "User $userToCheck has permission on $($mbx.Name) calendar"

        }

    }

}

This gets you 99% of the way.

September 1st, 2015 3:48pm

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

Other recent topics Other recent topics