Change exchange calendar permissions with Powershell

The president of our company wants access to view all of his direct reports’ calendars.

Option 1 go to each individual users computer, open outlook, and set calendar permission. (The issue with this is you may not know their passwords, or finding the free time to do it.)

Option 2 run this powershell script

#Test if you have the Exchange Management Console installed.
if (test-path -path "C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1"){}
else {write-host "You must have the Exchange Management Console installed on your computer."
	$x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
	exit}
#Auto launch and connect to Exchange
. 'C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1'
Connect-ExchangeServer -auto
$tempUsernameMailbox = read-host "Please enter the username of the Calendar you wish to edit      "
$tempUsernameAccess = read-host "Please enter the username of the User you want to have access to"
$AccessPermissions = read-host "What level of access would you like the user to have?(E)ditor, (R)eviewer, or (D)elete/Remove. ('e' 'r' 'd')?"
#Set readable permissions
if ($AccessPermissions -eq "e"){$AccessPermissionsRead = "Editor"}
	elseif ($AccessPermissions -eq "r"){$AccessPermissionsRead = "Reviewer"}
	elseif ($AccessPermissions -eq "d"){$AccessPermissionsRead = "Remove"}
else {write-host "Please specify a valid permission character"
	$x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
	exit}
write-host "You are about to give $tempUsernameAccess $AccessPermissionsRead permissions to $tempUsernameMailbox Calendar."
write-host "Press any key to continue . . ."
$x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
switch ($AccessPermissions){
	e{add-MailboxFolderPermission -Identity $tempUsernameMailbox":\Calendar" -User $tempUsernameAccess -Accessrights editor}
	r{add-MailboxFolderPermission -Identity $tempUsernameMailbox":\Calendar" -User $tempUsernameAccess -Accessrights reviewer}
	d{remove-mailboxfolderpermission -Identity $tempUsernameMailbox":\calendar" -user $tempUsernameAccess}
}
write-host "Press any key to continue . . ."
$x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
exit

Have fun, feel free to modify or add more permission sets for your company. This should work on your exchange server or if your computer has the Exchange Management Console. Remember this is a powershell script so you will need to install powershell if you are on XP. I have only tested with Windows 7.