- Open the PowerShells and connect to the Exchanges:
Install-Module -Name ExchangeOnlineManagement - Log into the Exchanges:
Connect-ExchangeOnline -UserPrincipalName <your_username> - Take a look at who has access to a calendar:
Get-MailboxFolderPermission -Identity "Snoop@Dogg.com:\calendar" - Give permissions to Martha:
Add-MailboxFolderPermission -Identity "Snoop@Dogg.com" -User "martha@Dogg.com" -AccessRights Reviewer - 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:
Post a Comment