Quantcast
Channel: Exchange Server 2013 - General Discussion forum
Viewing all articles
Browse latest Browse all 4521

Get complete calendar permissions

$
0
0

The manager of my organization's helpdesk asked me to come up with a way to display everyone's calendar permissions, and I wrote a little PowerShell script, I was just wondering if anyone knows of a way to make the output of this look better or knows of any already-built scripts/programs that will do what I'm trying to do.

$users = get-mailbox -ResultSize unlimited

$_csv = @()
$_csv_header = """Foldername"",""User"",""AccessRights"",""Identity"""
$_csv += $_csv_header

foreach ($user in $users){
$arg1 = $user.SamAccountName + ":\calendar"
$rights = Get-MailboxFolderPermission $arg1
write-host "getting mailbox permissions for $arg1"
    $_csv += """$user"""
    foreach ($right in $rights){
        $foldername = $right.foldername
        $displayname = $right.user.DisplayName
        $accessrights = $right.AccessRights
        $identity = $right.user.DisplayName

        $_csv += """$foldername"",""$displayname"",""$accessrights"",""$identity"""
        }
    }
$_csv | out-file c:\temp\calrights.csv -Encoding ASCII


zarberg@gmail.com


Viewing all articles
Browse latest Browse all 4521

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>