Room Mailboxes Calendar Permissions Report

Hi All,

Recently we have a requirement to get the report on permissions for all Room mailboxes calendar.

We want to know who has the permissions to book the rooms directly. This script is also a good example of switch case ūüôā

You can also modify the code line below at the beginning of the script if you want to extract Calendar permissions for other mailbox types.

$rooms = get-mailbox -RecipientTypeDetails roommailbox -resultsize unlimited

Report should be of below format:

Just extract the script from below link, Launch Exchange 2010 management shell & execute it.

https://gallery.technet.microsoft.com/scriptcenter/Room-Mailboxes-Calendar-00f8fa55

Here is how you will see the script execution on screen :

Below is the csv report that will get created inside same folder from whcih script has been executed.

Prerequisite: Exchange 2010 management Shell

############################################################################## 
#            Author: AMit Mittal 
#            Reviewer: Vikas Sukhija 
#            Date: 08/10/2015 
#            Modified: 08/19/2015 
#            Desc: get access details on Calenadr confrernce rooms 
############################################################################## 
 
$ConPermission = @() 
 
$rooms = get-mailbox -RecipientTypeDetails roommailbox -resultsize unlimited 
 
Foreach ($Mailbox in $rooms) 
{ 
 
$perm = Get-mailboxfolderpermission -identity ($Mailbox.alias+':\calendar') 
$userN = $null 
$userC = $null 
$userA = $null 
$userPA = $null 
$userNEA = $null 
$userR =  $null 
$userE = $null 
$userPE = $null 
$userO = $null 
$userAO = $null 
$userL = $null 
 
   foreach ($acc in $perm){ 
       $user = $null 
       $user = $acc.user 
       $user = $user.ToString() 
       $access =  $acc.accessrights 
    Switch($access){  
        None { $userN += $user + ","} 
    Contributor { $userC += $user + ","} 
    author { $userA += $user + ","} 
    PublishingAuthor { $userPA += $user + ","} 
    NonEditingAuthor { $userNEA += $user + ","} 
    Reviewer { $userR += $user + ","} 
    Editor { $userE += $user + ","} 
    PublishingEditor { $userPE += $user + ","} 
    Owner { $userO += $user + ","} 
    Availabilityonly { $userAO += $user + ","} 
    Limiteddetails { $userL += $user + ","} 
    default {"Something else happened"} 
        } 
    } 
 
$roomp = "" | select ConfRoomname,None,Contributor,author,PublishingAuthor,NonEditingAuthor,Reviewer,Editor,PublishingEditor,Owner,Availabilityonly,Limiteddetails 
$roomp.ConfRoomname = $Mailbox.displayname 
$roomp.None = $userN 
$roomp.Contributor = $userC 
$roomp.author = $userA 
$roomp.PublishingAuthor = $userPA 
$roomp.NonEditingAuthor = $userNEA 
$roomp.Reviewer = $userR 
$roomp.Editor = $userE 
$roomp.PublishingEditor = $userPE 
$roomp.Owner = $userO 
$roomp.Availabilityonly = $userAO 
$roomp.Limiteddetails = $userL 
$ConPermission += $roomp 
} 
 
$ConPermission | export-csv .\ConfPermissions.csv -notypeinformation 
 
######################################################################################
Regards

Sukhija Vikas

http://msexchange.me

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s