Wednesday, January 22, 2025

The Wizarding World of PowerShell Calendar Permissions

  1. Open the PowerShells and connect to the Exchanges:
    Install-Module -Name ExchangeOnlineManagement
  2. Log into the Exchanges:
    Connect-ExchangeOnline -UserPrincipalName <your_username>
  3. Take a look at who has access to a calendar:
    Get-MailboxFolderPermission -Identity "Snoop@Dogg.com:\calendar"
  4. Give permissions to Martha:
    Add-MailboxFolderPermission -Identity "Snoop@Dogg.com" -User "martha@Dogg.com" -AccessRights Reviewer
  5. When you finish, don't forget to close the session:
    Get-PSSession | Remove-PSSession

 Extra Credit:  If you would like to see what rights Martha has to every account in your M365 tenet you can use the command below.  This will take a long time if you have a lot of accounts.

Get-Mailbox | ForEach-Object {Write-Host "Processing mailbox: $($_.PrimarySmtpAddress)" Get-MailboxFolderPermission -Identity "$($_.PrimarySmtpAddress):\calendar" | Where-Object {$_.User -like "martha@Dogg.com"} | Select-Object Identity, User, AccessRights

No comments:

.Net said .No so this says .Youbetterorelsebuddy

 I was having trouble with .net framework install on new computers.  I'm not sure why it didn't work repeatedly, but found that if y...