Forum Discussion

Robert Bollinger's avatar
Robert Bollinger
Iron Contributor
Mar 20, 2019

Exchange Online: Remove Calendar Permissions for a list of users from 1 mailbox

Hey Guys, 

 

I am trying to remove calendar permissions for a list of users from a single mailbox. For Example this mailbox here: "Customer Mailbox" has 40 users added to various folders with reviewer, editor and other calendar permissions. 

 

I would like to remove those users and make sure to leave the default permissions as is. here is my command that is not working. 

 

Get-MailboxFolderPermission -Identity "Customer Mailbox" | Where {$_.User -notlike "*Default*" -and $_.User -notlike "*Anonymous*" -and $_.User -notlike "*Group Access*"} | foreach {Remove-MailboxFolderPermission -Identity "Customer Mailbox" -User $_}

 

The above command produces a result of about 40 users. 

 

How might i get my command to work ? 

 

Thanks, 

 

Robert

 

  • Chochi's avatar
    Chochi
    Copper Contributor

    Robert Bollinger 

     

    Will that also blow away any delegate permissions, where users can accept or decline on behalf of the calendar? 

     

    Get-MailboxFolderPermission -Identity "Customer Mailbox" | Where {$_.User -notlike "*Default*" -and $_.User -notlike "*Anonymous*" -and $_.User -notlike "*Group Access*"} | foreach {Remove-MailboxFolderPermission -Identity "Customer Mailbox" -User $_}

     

Resources