This is a powershell script to remove the permission about unknown SID/Users from public folders recursively ; maybe it happens to deal with customers with hundreds of public folder (argh!!!!) and to find some users in the permissions that are unknown as in this case:
To eliminate all those dirty SID you can run this script:
get-publicfolder “\” -recurse -resultsize unlimited | get-publicfolderclientpermission | where {$_.user -like “NT:S-1-5-21-3988733805-4278487544-884773470-*”} | remove-publicfolderclientpermission -confirm:$false
For safety maybe throw him on the first time with a -ResultSize limited to 5 or with -confirm:$True to provide confirmation before deleting the permission.
slow but really simple and GOOD script đ
Just runnin’ it on our hundreds of thousands pfâs…
Thank you!
these
[…] http://www.itxperience.net/remove-unknown-sid-from-public-folder-permissions-exchange-2013/ […]
Thanks for the post. I figured I would never need an orphan user on any folder so I did NT:* instead and that worked too.
Exchange 2010:
Get-PublicFolder “\” -Recurse -ResultSize unlimited | Get-PublicFolderClientPermission | where {$_.User -like “NT User:SID NUMBER} | Remove-PublicFolderClientPermission -Whatif –
confirm:$false
Remove -Whatif (if you are comfortable with the test outcome)