Event ID: 2028
Transport Delivery MSExchange Public Store
The delivery of a message sent by public folder AFEFE2D3A4AAE242A27C26178911274C-000005387E74 has failed
To: Someuser
While investigating this, we found that a lot of our public folders had hanging SIDs, which are the "NT USER:S-1-5-93859384-1394871948 like entries you see on an ACL when that user has been deleted from Active Directory.
Fixing all of these hanging SIDs from each public folder would be a nightmare if done manually (we have several hundred public folders). Powershell should be able to handle this! And did it ever. In one line:
get-publicfolder "\" -recurse -resultsize unlimited | get-publicfolderclientpermission | where {$_.user -like "NT User:S-1-*"} | % {remove-publicfolderclientpermission -identity $_.identity -user $_.user -access $_.accessrights -confirm:$true}
Thanks for the cmdled!
ReplyDeleteSaved me a lot of time