OBJECTIVE: Remove or add user permissions from or to Exchange Public folder and all folders under it (recursive) with Exchange built-in PowerShell scripts RemoveUserFromPFRecursive.ps1 and AddUsersToPFRecursive.ps1.
ISSUE: Scripts RemoveUserFromPFRecursive.ps1 and AddUsersToPFRecursive.ps1 don't work if Exchange Public Folder name contains space(s).
SOLUTION:
Create vbackup copy of original RemoveUserFromPFRecursive.ps1 and AddUsersToPFRecursive.ps1 scripts.
In scripts RemoveUserFromPFRecursive.ps1 and AddUsersToPFRecursive.ps1
find
"get-publicfolder -identity $TopPublicFolder -Recurse -resultsize unlimited"replace by
#Fixing name with space problem:
'get-publicfolder -identity "$TopPublicFolder"-Recurse -resultsize unlimited'
find
$permission | remove-PublicFolderClientPermission -identity $_.Identity -server $_.OriginatingServerreplace by
#Fixing confirmation problem
$permission | remove-PublicFolderClientPermission -identity $_.Identity -server $_.OriginatingServer -Confirm:$false
DOWNLOAD:
Download AddUsersToPFRecursive_vz.zip md5: 2bc7416556e60958b25a4d9f9648111f
Download RemoveUserFromPFRecursive_vz.zip md5: f247fd6c7951309b9b8d0d0e4b37dff0
2 комментария:
Much appreciated. You saved me a few minutes!
Than you mate you saved heaps of time and effort ...your a legend
Отправить комментарий