In an effort to clean the contents of all Public Folders (including mail-enabled folders), I need to generate an export of all the 40.000 Public Folders in our Exchange environment and list its name (Identity), the authorised users (User) and the assigned permissions (AccessRights). I have tried a Microsoft tool called ExFolders and while it succesfully made an export of the permissions of every folder, the formatting was unusable, adding 2 columns for every permission entry. So I looked for a better option with 3 columns in total. Using PowerShell this seems a straightforward action that should be easily achieved with the following script:
$PFAll = Get-PublicFolder \ -Recurse -ResultSize Unlimited
$PFClientPermissions = Get-PublicFolderClientPermission $PFAll | Select-Object Identity,@{Expression={$_.User};Label="User";} ,@{Expression={$_.AccessRights};Label="AccessRights";}
$PFClientPermissions | Export-CSV -Path C:\Exports\PublicFolderClientPermission.csv
The $PFAll can be succesfully set. When creating $PFClientPermissions, the following error is returned (exceeding data receiving limit in PowerShell):
Sending date to a remote command failed with the following error message: The current deserialized object size of the data received from remote client exceeded allowed maximum object size. The current deserialized object size is 78694400. Allowed maximum object size is 78643200. For more information, see the about_Remote_Troubleshooting Help topic. + CategoryInfo : OperationStopped: (System.Manageme...pressionSyncJob:PSInvokeExpressionSyncJob) [], PSRe motingTransportException + FullyQualifiedErrorId : JobFailure
I hope you can help. Thanks in advance for any advice or assistance.