Powershell novice- I am trying to work out a way to use powershell to clean up some calendar permissions in Exchange 2013. What I want to do is use get-mailbox to pull all mailboxes, and only remove the calendar permissions for user XYZ where it is = Reviewer. Can this be done? I have tried a few different ways to arrange the syntax.
This seems to be the closest I have gotten:
get-mailbox |% {remove-mailboxfolderpermission -Identity ($_.Alias = ":\Calendar") -User "XYZ" -AccessRights "Reviewer} -whatif
This creates a pipeline concurrency error, but maybe this gives an idea of what I am trying to do.