Error when running Remove-Mailboxpermission

Status
Not open for further replies.
A

Alexei Segundo

This should be straightforward, but I can't seem to get it right.

I want to remove ExternalAccount permissions on a specific mailbox. Here's the command I use to confirm that the permission is present:

Get-MailboxPermission user1 -domaincontroller dc1.contoso.com | ? {$_.accessrights -like " *ExternalAccount*" }

Identity User AccessRights IsInherited Deny
-------- ---- ------------ ----------- --
contoso.com/Use... Contoso\User1 {FullAccess, ExternalAccount, ReadPermission} False False

All good so far. Now I just want to remove the ExternalAccount permission assigned to Contoso\User1. Here's the command:

Remove-MailboxPermission -Identity User1 -User " Contoso\User1" -AccessRights ExternalAccount -domaincontroller dc1.contoso.com

The above command generates the following error:

Remove-MailboxPermission : Can't remove the access control entry on the object " CN=User1,OU=User Objects,DC=contoso,DC=com" f
or account " Contoso\User1" because the ACE doesn't exist on the object.
At line:1 char:25
+ Remove-MailboxPermission <<<< -Identity User1 -User " User1" -AccessRights ExternalAccount -domaincontroller dc1.contoso.com
+ CategoryInfo : InvalidOperation: (0:Int32) [Remove-MailboxPermission], InvalidOperationException
+ FullyQualifiedErrorId : 78249DD3,Microsoft.Exchange.Management.RecipientTasks.RemoveMailboxPermission

Any thoughts on this?

Alexei
 
M

Michel de Rooij

A

Alexei Segundo

Hi Michel

Thanks very much - you were right on the money!

The ACE entries were pointing at the sIDHistory value, but were being displayed via get-mailboxpermission as the target domain account. Confusing!

Anyway, I now have a script that runs Remove-Mailboxpermission using the sIDHistory value for the -user parameter. Works like a charm.

Alexei
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
B Automation error running VB macro code Outlook VBA and Custom Forms 8
G Error when running scanpst.exe Using Outlook 1
T Problem with Outlook 2007 (running Vista) There was an error synchronizing your folder hierarchy. Er Using Outlook 1
F Error while running setup /preparead Exchange Server Administration 2
T Microsoft Outlook 2010 Error "Another version of Outlook is currently running." when clicking on a m Using Outlook 1
B 2010 Setup Error - "One or more servers running Exchange 2000" Exchange Server Administration 5
B Getting error 'There was an error running rules. Not all messages were processed' while creating rule Using Outlook 5
T Outlook 2003 running with Vista OS; error 0x80040900 since 3AM MDT on June 24, 2010 after an Windows update.____ Using Outlook 0
R Microsoft Outlook 2007 will not open (running windows 7). No error message displayed. Using Outlook 2
M Running 2003 Outlook..Contract manager indicates error and can not open even in safe mode Using Outlook 0
C Fatal Error when running Exchange 2010 Performance Troubleshooter Exchange Server Administration 1
R EMS error "The specified recipient is of type UserMailbox" while running Enable-MailUser command Exchange Server Administration 1
L Error running Setup.com /pad for exchange 2010 Exchange Server Administration 1
E Word macro running from OL VBA throwing error on Word SaveAs?? Outlook VBA and Custom Forms 8
E Complite error on SaveAsFile method Outlook VBA and Custom Forms 3
I Error saving screenshots in a custom form in outlook 2016, outlook 365 - ok in outlook 2013, outlook 2010 Outlook VBA and Custom Forms 5
D Outlook VBA error extracting property data from GetRules collection Outlook VBA and Custom Forms 10
A Unable to save recurring Meeting to Documents folder due to error Using Outlook 2
M Compile error: User-defined type not defined Outlook VBA and Custom Forms 0
R Error when trying to forward current email item Outlook VBA and Custom Forms 7
M ERROR: None of your email accounts could send to this recipient Using Outlook 2
J OLADD.FAE Error When Exporting Contacts Using Outlook 6
C Send/receive error 80040119 Using Outlook 2
W error with the permission for the file Outlook VBA and Custom Forms 0
L Outlook 2019 MAC sync error after working for 4 hours Using Outlook 1
A Run time error 424. object required in outlook 2013 Outlook VBA and Custom Forms 10
M error code 0x8DE00006 Using Outlook 1
M Desktop Version Of Outlook Generating Error Using Outlook 4
M Send/Receive error 0x800CCC0F Using Outlook 0
T Outlook 2016 CSV Translator Import Error Using Outlook 6
ManaarZakaria I'm afraid of this issue, cause of strange error Exchange Server Administration 2
P Suppress dialog box on email check error? Using Outlook 5
vodkasoda Object could not be found Error in Outlook 2007 Outlook VBA and Custom Forms 5
S VBA Macro - Run-time error '424': object required - Help Please Outlook VBA and Custom Forms 3
avant-guvnor Outlook.Application now produces error Outlook VBA and Custom Forms 5
P Run Time Error 91 when linking contact to task in VBA Outlook VBA and Custom Forms 1
N Error 0x80090326 when trying to setup IMAP account on Outlook.com Using Outlook.com accounts in Outlook 1
N Saving And Deleting Outlook Attachments with Unknown Error Message Outlook VBA and Custom Forms 1
Dennis Gaudenzi Your setup couldn't be started because of an unexpected error (mapi 0x80040604) Using Outlook 14
M Outlook 2013 fails to start -- missing WindowsCodecs.dll error Using Outlook 3
Steshelter ICloud Unexpected Error Using Outlook 5
Rupert Dragwater "there was an error reading this theme" Using Outlook 3
A Error: The name cannot be matched to a name in the address list Using Outlook.com accounts in Outlook 0
S Error using AddressEntry.GetContact - need help Outlook VBA and Custom Forms 2
J Outlook - 2013 - Error msg when copying folders from Online Archives to another user's mailbox Using Outlook 0
Vijay Error in rule- Run a script Using Outlook 1
J Object Variable or With Block Not Set Error in Outlook 2016 and not Outlook 2013 Outlook VBA and Custom Forms 3
R Macro to copy email to excel - Runtime Error 91 Object Variable Not Set Outlook VBA and Custom Forms 11
Diane Poremsky The Attachment Size Exceeds the Allowable Limit Error New Slipstick.com Articles 0
Diane Poremsky RMS Error: System clock has been tampered with New Slipstick.com Articles 0
Similar threads


















































Top