GTconsult updatign exec

A request came through to the Umlindi Helpdesk to enable all user calendars to be visible for the rest of the company. Straight-forward? Not exactly.  I first created a policy on exchange online via Office 365 Portal, but this was apparently incorrect. Next step was chatting to Microsoft, who explained that this must be done via PowerShell PS.

Onto the commands. Open PowerShell using administrator option.

Set-ExecutionPolicy RemoteSigned

$UserCredential = Get-Credential

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

Import-PSSession $Session

Run either of these commands, first one is for individual mailboxes, bottom one is for all user mailboxes.

Get-MailboxFolderPermission <primary email address>:\calendar | Set-MailboxFolderPermission -AccessRights LimitedDetails -User Default

OR

foreach ($user in Get-Mailbox -RecipientTypeDetails UserMailbox) {

$cal = $user.alias+”:\Calendar”

Set-MailboxFolderPermission -Identity $cal -User Default -AccessRights LimitedDetails

}

Wait for it to complete, and then:

Remove-PSSession $Session

*Be sure to disconnect the remote PowerShell session when you’re finished. If you close the Windows PowerShell window without disconnecting the session, you could use up all the remote PowerShell sessions available to you, and you’ll need to wait for the sessions to expire. To disconnect the remote PowerShell session, run the following command.

by John Torrance


Apply to Work @ GT



Leave a Reply

Your email address will not be published. Required fields are marked *

*