以递归方式授予公共文件夹权限

此 PS 脚本以递归方式授予到 Exchange 2007 公用文件夹的用户权限 该脚本将拾取文件列表,然后以递归方式授予您所列出的所有子文件夹的根公用文件夹的权限。

add-pssnapin microsoft.exchange.management.powershell.admin
$infile = import-csv “C:\PublicFolders.csv”
$PFserver = “CPPF01.Corp.myCompany.com”

$users = $infile
$users | Foreach-Object {
$TopPFolder = $_.TopPublicFolder
$AccessRights = $_.Permissions
$User = $_.user
if ($_.TopPublicFolder -ne $null) {
Write-Host “Adding permission for $user on ($TopPFolder), and Sub Folders”
Get-Publicfolder $TopPFolder -Recurse | Add-PublicFolderClientPermission -User $User -AccessRights $AccessRights -server $PFserver -erroraction SilentlyContinue}}

Latest posts by Exchange中文站 (see all)
发布于: 浏览:2140 次

还没有评论

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据