How to remove Default & Anonymous User as default User on all created public folder?

CC 0 Reputation points
2024-11-12T01:14:43.0733333+00:00

How to remove the Default & Anonymous User as default User on the new created public folder?

image

Found that if these two users shown on the list and other user can read this folder.

Thank you.

Exchange Exchange Server Management
Windows for business Windows Server User experience PowerShell
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Vasil Michev 119.5K Reputation points MVP Volunteer Moderator
    2024-11-12T07:26:57.56+00:00

    You cannot delete those entries, they are system/built-in ones. What you can do is adjust the permission level, i.e. set it to None:

    Add-PublicFolderClientPermission \PFName -User Default -AccessRights None
    Add-PublicFolderClientPermission \PFName -User Anonymous -AccessRights None
    

  2. Anonymous
    2024-11-13T01:51:29.6766667+00:00

    Hello,

    In a Microsoft Exchange environment, “Default” and “Anonymous” are special permissions entries on public folders. The “Default” user represents the default permissions for any authenticated user within the organization, while the “Anonymous” user represents any unauthenticated user that might access the public folder.

    To remove or modify these permissions on all public folders, you can use the Exchange Management Shell (EMS), which is a PowerShell extension for Exchange. Below are the steps to remove the “Default” and “Anonymous” user permissions from all public folders using Exchange Management Shell:

    Launch Exchange Management Shell on your Exchange server.

    Use the Get-PublicFolder cmdlet to retrieve a list of all public folders. You’ll want to pipe this list to the ForEach-Object cmdlet to iterate through each folder:

    Get-PublicFolder -Recurse -ResultSize Unlimited | ForEach-Object {

    Remove the Default user permissions

    $_ | Remove-PublicFolderClientPermission -User Default -Confirm:$false -ErrorAction SilentlyContinue

    Remove the Anonymous user permissions

    $_ | Remove-PublicFolderClientPermission -User Anonymous -Confirm:$false -ErrorAction SilentlyContinue

    }

    This command retrieves all public folders, removes “Default” user permissions, and then removes “Anonymous” user permissions for each folder without asking for confirmation.

    If you also need to remove these permissions from the system public folders, you can use similar commands:

    Get-PublicFolder -Recurse -ResultSize Unlimited -Identity "\NON_IPM_SUBTREE" | ForEach-Object {

    $_ | Remove-PublicFolderClientPermission -User Default -Confirm:$false -ErrorAction SilentlyContinue

    $_ | Remove-PublicFolderClientPermission -User Anonymous -Confirm:$false -ErrorAction SilentlyContinue

    }

    Please note that changing permissions on public folders may impact users’ ability to access the content within them.

    Best Regards,

    Hania Lian

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.

     


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.