Exchange Calendar Permissions

Alfonso Ignacio
Alfonso Ignacio used Ask the Experts™
on
Hi All,

I'm tyring to extract all exchange calendar permissions in my exchanges
Can anyone share a script on how to accomplish this?

I was able to get something out from google but the problem is it doesn't have an export option to put it on a text file or CSV file.
the tool i'm referring to has a screenshot in my post.

Looking forward for a script response..


Thanks
Form.PNG
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Glenn MSystems Engineer / Manager
Commented:
Get-MailboxFolderPermission -Identity user@domain:\Calendar |fl
IT Engineer
Distinguished Expert 2017
Commented:
I'm not sure how to export it to CSV format because Export-CSV c:\temp\output.csv $Output is not working

But you can get TXT file and Import it to Excel with Delimiter (coma)

$boxen = get-mailbox -Resultsize Unlimited
foreach ($box in $boxen) {
    $addresses = $box.EmailAddresses
    foreach ( $address in $addresses ) {
        [string]$ID = $address.AddressString
        write-host ID1 $ID
        $ID += ":\Calendar"
        $permissions = get-mailboxfolderpermission $ID
        write-host ID: $ID
        foreach ( $perm in $permissions ) {
            $mailbox = $address
            $granteduser = $perm.User
            $access = $perm.AccessRights
            $identity = $perm.Identity
            $valid = $perm.IsValid
            if ( $identity -ne "Anonymous" ) {
                $outstring = "$mailbox,$granteduser,$identity,$access,$valid`n"
                $output += $outstring
                write-host $outstring
            }
        }
    }
}
set-content C:\temp\out.txt $output

Open in new window

Glenn MSystems Engineer / Manager
Commented:
To Export file
Get-MailboxFolderPermission -Identity user@domain.local:\Calendar |fl >C:\temp\Permissions.txt
or
Get-MailboxFolderPermission -Identity user@domain.local:\Calendar |fl >C:\temp\Permissions.csv
Tom CieslikIT Engineer
Distinguished Expert 2017

Commented:
Best solution provided. No more other questions from author

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial