How to give every exchange user permissions to view every other exchange user’s calendar.

I was after a way to centrally manage shared calendars so that everyone in the company could view every single other user’s calendar. I found a few scripts on the internet but none did exactly what I wanted – many failed right off the bat when trying to assign permissions to “DOMAIN\Domain Users” or similar.

I eventually found one and modified it for my use. This powershell script can be pasted in then press enter a few times and it will run against every user on the system assigning read permissions for every user.

$userAccounts = get-mailbox -resultsize unlimited
ForEach ($user in $userAccounts)
{
	$userAccountssec = get-mailbox -resultsize unlimited
	$myUser = $user
	ForEach ($user in $userAccountssec)
	{
	 Add-MailboxFolderPermission -Identity ($myUser.UserPrincipalName + ":\Calendar") -User $user -AccessRights Reviewer
	}
}

Because my wordpress layout chops off the right hand side, click and drag over the entire script to highlight it and then copy it to clipboard. Then paste it into notepad or similar so you can see the entire add-mailboxfolderpermission line.

You could probably also use the above script as a template for any other command you would like to run for every user against every user.

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Comment on this topic

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