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.