Solved

Remove permisions to a calaendar

Posted on 2011-09-30
9
2,321 Views
Last Modified: 2012-05-12
Hi

I am strugling with the correct Power Shell command to remove permisions to a users Calendar in Exchange 2010.

The Permisions on the Mailbox Calendar are currently as below.
..........................................................................................................................................................
[PS] C:\Windows\system32>Get-MailboxFolderPermission -identity "gina waldron:\Calendar"


RunspaceId   : 40383525-60cf-4a1f-81bd-874230905680
FolderName   : Calendar
User         : Default
AccessRights : {AvailabilityOnly}
Identity     : Default
IsValid      : True

RunspaceId   : 40383525-60cf-4a1f-81bd-874230905680
FolderName   : Calendar
User         : _All NSF CMi Employees Including Overseas Divisions
AccessRights : {Reviewer}
Identity     : _All NSF CMi Employees Including Overseas Divisions
IsValid      : True

...................................................................................................................................................

Identity _All NSF CMi Employees Including Overseas Divisions is a distribution group.  The alias of the distribution group is ALL.

I need to remove this distribution group from having access to this users Mailbox.

I thought the command below was correct but it does not want to work.

[PS] C:\Windows\system32>Remove-MailboxPermission -Identity "gina waldron:\calendar" -User ALL  -AccessRights reviewer -inheritanceType all

But I get the error below.  

Cannot process argument transformation on parameter 'AccessRights'. Cannot convert value "reviewer" to type "Microsoft.
Exchange.Management.RecipientTasks.MailboxRights[]". Error: "Cannot convert value "reviewer" to type "Microsoft.Exchang
e.Management.RecipientTasks.MailboxRights" due to invalid enumeration values. Specify one of the following enumeration
values and try again. The possible enumeration values are "FullAccess, SendAs, ExternalAccount, DeleteItem, ReadPermiss
ion, ChangePermission, ChangeOwner"."
    + CategoryInfo          : InvalidData: (:) [Remove-MailboxPermission], ParameterBindin...mationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,Remove-MailboxPermission

What have i got wrong?

0
Comment
Question by:cmiadmin
  • 5
  • 4
9 Comments
 
LVL 31

Expert Comment

by:LeeDerbyshire
ID: 36892214
I would try using ChangePermission instead of reviewer, only because it seems the closest fit from the available enumerations.
0
 
LVL 31

Expert Comment

by:LeeDerbyshire
ID: 36892228
Oops, I think ReadPermission is actually the closest.
0
 
LVL 1

Author Comment

by:cmiadmin
ID: 36892310
I have tried this:

remove-mailboxfolderpermission -identity "gwaldron:\calendar" -user ALL  -accessRights Reviewer

But get this result:

A positional parameter cannot be found that accepts argument '-accessRights'.
    + CategoryInfo          : InvalidArgument: (:) [Remove-MailboxFolderPermission], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Remove-MailboxFolderPermission

0
 
LVL 31

Expert Comment

by:LeeDerbyshire
ID: 36892333
What it is saying is that Reviewer is not a valid value for the -AccessRights parameter.  Even though it appears in your output for Get-MailboxFolderPermission.  Try
 -AccessRights ReadPermission
instead.

You could probably do this in Outlook, too, if you have access to a PC configured to log into that mailbox.
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 1

Author Comment

by:cmiadmin
ID: 36892784
That would be the easy way if I had access to the users mailbox but I don't unfortunatly I don't.


Also I am trying to learn all the correct PowerShell commands because I can see that once mastered it is much quicker to use than the GUI.

I have triied using -AccessRights ReadPermission

but get the same "A positional parameter cannot be found that accepts argument '-accessRights'"

error..
0
 
LVL 31

Accepted Solution

by:
LeeDerbyshire earned 500 total points
ID: 36892875
Try this (Remove-MailboxFolderPermission instead of Remove-MailboxPermission, and dropping AccessRights altogether, because Remove-MailboxPermission doesn't use it):

Remove-MailboxFolderPermission -identity "gwaldron:\calendar" -user ALL
0
 
LVL 31

Expert Comment

by:LeeDerbyshire
ID: 36892879
I mean Remove-MailboxFolderPermission doesn't use it.  Or InheritanceType.
0
 
LVL 1

Author Comment

by:cmiadmin
ID: 36892919
Hi

Managed to do it.
This is the command that I used:

remove-mailboxfolderpermission -identity "gwaldron:\calendar" -user ALL

Thanks for all your help.

Regards
Kevan
0
 
LVL 1

Author Closing Comment

by:cmiadmin
ID: 36892927
Thanks for your help
0

Featured Post

Too many email signature updates to deal with?

Do you feel like you are taking up all of your time constantly visiting users’ desks to make changes to email signatures? Wish you could manage all signatures from one central location, easily design them and deploy them quickly to users? Well, there is an easy way!

Join & Write a Comment

Resolve DNS query failed errors for Exchange
Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
In this video we show how to create a Shared Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Sha…
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now