none
How to remove ResourceDelegates from mailbox by PowerShell? RRS feed

Answers

  • HI Samata,

    Are you talking about Room mailbox "Resource Delegate" or Your personal mailbox delegate.

    A) To removeDelegates from Personal mailbox. Please follow below steps:-

    1. Get-Mailboxpermission "Your email address" | fl 

    - Note:-You will get the list of all the users that have fullaccess on your mailbox. Please make a note of the kind of permission that hold. It can be Fullaccess, Readpermission, changeowner, Changepermission

    2. Get the display name or Primary email address of the listed users that you want to remove

    3. Remove-mailboxpermission "Your email address"-user  "delegate's email address" -Accessrights Fullaccess, Readpermission 

    B) How to remove Calendar permission:-

    1. Get-mailboxfolderpermission Samata@contoso.com:\calendar

    2. Remove-mailboxfolderpermission  Samata@contoso.com:\calendar -user "Delegates email address" -Confirm:$false

    C) How to check "Resource delegates on a room mailbox"

    1. Get-Calendarprocessing "email address of the room mailbox | fl Resour*

    2. SetCalendarprocessing "email address of the room mailbox" - ResourceDelegates:$null

    You can do this in bulk:-

    - https://mandie.net/2013/03/20/set-calendarprocessing-resourcedelegates-and-friends-without-tears/

    Hope this helps




    • Edited by Akabe Friday, January 27, 2017 11:38 PM
    • Marked as answer by SAMATA Thursday, February 9, 2017 7:15 AM
    Friday, January 27, 2017 4:41 PM
  • Run get-mailboxpermission and see if the delegate still exists

    If yes, then use Remove-mailboxpermission "Your email address"-user  "delegate's email address" -Accessrights Fullaccess, Readpermission -Automapping $false

    Is the delegate tobe seen in get-mailboxfolderpermission user@domain.com:\calendar

    After removing the permission restart outlook.

    Also you can nother permission:-

    Get-mailboxfolderpermission user@domain.com:\

    This will check if the delegate has any permission on the root folder

    If above does nto help, then go to the AD accoutn of the user mailbox > Open attribute editor > Check the values under msExchDelegateListLink. You wil see the delegate listed here. If you just remove the entry and issue should be resolved


    • Edited by Akabe Sunday, January 29, 2017 2:55 PM
    • Marked as answer by SAMATA Thursday, February 9, 2017 7:15 AM
    Sunday, January 29, 2017 2:51 PM
  • check this link:

    https://social.technet.microsoft.com/Forums/en-US/9b791b56-1e24-4293-aba0-7ace7befa47b/remove-mailbox-delegates-via-powershell?forum=exchangesvrgenerallegacy

    I mean we can remove permission on delegate setting, but we can't remove that user from delegate list.

    1. Delegate permission setting under Account Setting

    2. After running the following commands:

    Remove-MailboxFolderPermission User1:\calendar -User user3 -Confirm:$false
    Remove-MailboxFolderPermission User1:\inbox-User user3 -Confirm:$false
    Remove-MailboxFolderPermission User1:\notes -User user3 -Confirm:$false
    Remove-MailboxFolderPermission User1:\contacts-User user3 -Confirm:$false
    Remove-MailboxFolderPermission User1:\tasks-User user3 -Confirm:$false

    3. Then the delegate permission looks like this:


    Best Regards,

    Lynn-Li
    TechNet Community Support


    Please remember to mark the replies as answers.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Marked as answer by SAMATA Thursday, February 9, 2017 7:15 AM
    Tuesday, February 7, 2017 9:17 AM
    Moderator
  • There is nothing special...users in Outlook Delegate Access stay there. I understand all recommendation but the purpose is also to know why we can't do it by PowerShell.
    The reason is just no Exchange command can remove user from the list. We can only edit the permission via Exchange Management Shell. Just like delegate will not be shown in that list if we use Add-MailboxPermission command to assign permission.

    Best Regards,

    Lynn-Li
    TechNet Community Support


    Please remember to mark the replies as answers.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Marked as answer by SAMATA Thursday, February 9, 2017 7:14 AM
    Wednesday, February 8, 2017 8:25 AM
    Moderator

All replies

  • HI Samata,

    Are you talking about Room mailbox "Resource Delegate" or Your personal mailbox delegate.

    A) To removeDelegates from Personal mailbox. Please follow below steps:-

    1. Get-Mailboxpermission "Your email address" | fl 

    - Note:-You will get the list of all the users that have fullaccess on your mailbox. Please make a note of the kind of permission that hold. It can be Fullaccess, Readpermission, changeowner, Changepermission

    2. Get the display name or Primary email address of the listed users that you want to remove

    3. Remove-mailboxpermission "Your email address"-user  "delegate's email address" -Accessrights Fullaccess, Readpermission 

    B) How to remove Calendar permission:-

    1. Get-mailboxfolderpermission Samata@contoso.com:\calendar

    2. Remove-mailboxfolderpermission  Samata@contoso.com:\calendar -user "Delegates email address" -Confirm:$false

    C) How to check "Resource delegates on a room mailbox"

    1. Get-Calendarprocessing "email address of the room mailbox | fl Resour*

    2. SetCalendarprocessing "email address of the room mailbox" - ResourceDelegates:$null

    You can do this in bulk:-

    - https://mandie.net/2013/03/20/set-calendarprocessing-resourcedelegates-and-friends-without-tears/

    Hope this helps




    • Edited by Akabe Friday, January 27, 2017 11:38 PM
    • Marked as answer by SAMATA Thursday, February 9, 2017 7:15 AM
    Friday, January 27, 2017 4:41 PM
  • I'm talking about this access below. I want to remove it by cmd:

    Friday, January 27, 2017 11:30 PM
  • This can be achieved by following above mentioned Steps ie. A), B) VIA Exchange powershell
    Friday, January 27, 2017 11:36 PM
  • I did but user is still in Delegate Access.
    Saturday, January 28, 2017 7:03 AM
  • Run get-mailboxpermission and see if the delegate still exists

    If yes, then use Remove-mailboxpermission "Your email address"-user  "delegate's email address" -Accessrights Fullaccess, Readpermission -Automapping $false

    Is the delegate tobe seen in get-mailboxfolderpermission user@domain.com:\calendar

    After removing the permission restart outlook.

    Also you can nother permission:-

    Get-mailboxfolderpermission user@domain.com:\

    This will check if the delegate has any permission on the root folder

    If above does nto help, then go to the AD accoutn of the user mailbox > Open attribute editor > Check the values under msExchDelegateListLink. You wil see the delegate listed here. If you just remove the entry and issue should be resolved


    • Edited by Akabe Sunday, January 29, 2017 2:55 PM
    • Marked as answer by SAMATA Thursday, February 9, 2017 7:15 AM
    Sunday, January 29, 2017 2:51 PM
  • I did but user is still in Delegate Access.

    What's the command you use to remove mailbox permission?

    Remove-mailboxpermission "Your email address"-user  "delegate's email address" -Accessrights Fullaccess, Readpermission

    If the suggested command above doesn't work, it's because that delegate doesn't have Fullaccess and readpermission permission on user mailbox.

    So we need to know the exactly permissions assigned on user mailbox, then remove it. Example:

    After that, re-open outlook or restart outlook in online mode to check this change.


    Best Regards,

    Lynn-Li
    TechNet Community Support


    Please remember to mark the replies as answers.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, January 30, 2017 7:13 AM
    Moderator
  • I already tried all that. Not working. Have you tried that by yourself and does it works?
    Wednesday, February 1, 2017 4:18 AM
  • I already tried all that. Not working. Have you tried that by yourself and does it works?

    Post the results of the following commands:

    Get-MailboxPermission UserName | where {($_.IsInherited -eq $false) -and-not ($_.User -like "NT AUTHORITY\SELF")} | FL -Wrap


    Best Regards,

    Lynn-Li
    TechNet Community Support


    Please remember to mark the replies as answers.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, February 1, 2017 5:03 AM
    Moderator
  • check this link:

    https://social.technet.microsoft.com/Forums/en-US/9b791b56-1e24-4293-aba0-7ace7befa47b/remove-mailbox-delegates-via-powershell?forum=exchangesvrgenerallegacy

    Wednesday, February 1, 2017 6:23 AM
  • check this link:

    https://social.technet.microsoft.com/Forums/en-US/9b791b56-1e24-4293-aba0-7ace7befa47b/remove-mailbox-delegates-via-powershell?forum=exchangesvrgenerallegacy

    I mean we can remove permission on delegate setting, but we can't remove that user from delegate list.

    1. Delegate permission setting under Account Setting

    2. After running the following commands:

    Remove-MailboxFolderPermission User1:\calendar -User user3 -Confirm:$false
    Remove-MailboxFolderPermission User1:\inbox-User user3 -Confirm:$false
    Remove-MailboxFolderPermission User1:\notes -User user3 -Confirm:$false
    Remove-MailboxFolderPermission User1:\contacts-User user3 -Confirm:$false
    Remove-MailboxFolderPermission User1:\tasks-User user3 -Confirm:$false

    3. Then the delegate permission looks like this:


    Best Regards,

    Lynn-Li
    TechNet Community Support


    Please remember to mark the replies as answers.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Marked as answer by SAMATA Thursday, February 9, 2017 7:15 AM
    Tuesday, February 7, 2017 9:17 AM
    Moderator
  • Is there any reason why we can't remove that user from delegate list by PowerShell?
    • Edited by SAMATA Tuesday, February 7, 2017 4:07 PM
    Tuesday, February 7, 2017 4:06 PM
  • Hi Samata,

    Could you post the snapshot of before and post removing the delegate. In that way we will have better understanding based on your scenerio

    However above recommendation is the best method to remove a delegate 

    Tuesday, February 7, 2017 4:12 PM
  • There is nothing special...users in Outlook Delegate Access stay there. I understand all recommendation but the purpose is also to know why we can't do it by PowerShell.
    Tuesday, February 7, 2017 4:22 PM
  • There is nothing special...users in Outlook Delegate Access stay there. I understand all recommendation but the purpose is also to know why we can't do it by PowerShell.
    The reason is just no Exchange command can remove user from the list. We can only edit the permission via Exchange Management Shell. Just like delegate will not be shown in that list if we use Add-MailboxPermission command to assign permission.

    Best Regards,

    Lynn-Li
    TechNet Community Support


    Please remember to mark the replies as answers.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Marked as answer by SAMATA Thursday, February 9, 2017 7:14 AM
    Wednesday, February 8, 2017 8:25 AM
    Moderator
  • Thanks for the confirmation.
    Thursday, February 9, 2017 7:14 AM
  • I accomplished this on Exchange 2016 with the following commands to remove "user4" from "bob's" delegate list:

    Set-Mailbox bob@contoso.com -Type Room
    Set-CalendarProcessing bob@contoso.com -ResourceDelegates user1@contoso.com,user2@contoso.com,user3@contoso.com
    Set-Mailbox bob@contoso.com -Type Regular


    • Edited by fperez2nd Thursday, March 29, 2018 2:33 PM
    • Proposed as answer by fperez2nd Thursday, March 29, 2018 2:34 PM
    Thursday, March 29, 2018 2:32 PM