当前位置:网站首页 > 更多 > 玩电脑 > 正文

[玩转系统] Set-MailboxFolderPermission - 没有找到用户的现有权限条目

作者:精品下载站 日期:2024-12-14 22:34:45 浏览:13 分类:玩电脑

Set-MailboxFolderPermission - 没有找到用户的现有权限条目


Set-MailboxFolderPermission 是一个出色的 cmdlet,用于使用 PowerShell 设置日历访问权限。我们可以在 Exchange 本地组织或 Exchange Online 组织上使用它。运行 Set-MailboxFolderPermission cmdlet 后,错误显示没有找到用户的现有权限条目。在本文中,您将了解发生这种情况的原因以及找不到用户的现有权限条目的解决方案。

没有找到用户的现有权限条目

在运行命令之前,让我们启动管理控制台:

  • 如果您有本地 Exchange,请运行 Exchange 命令行管理程序

  • 如果您有 Office 365,请连接到 Exchange Online PowerShell

我们希望向用户 Grace Rees 授予对 Amanda Morgan 日历的编辑权。让我们运行 cmdlet Set-MailboxFolderPermission。运行 cmdlet 后,我们看到输出给出错误:没有找到用户 Grace Rees 的现有权限条目。

[PS] C:\>Set-MailboxFolderPermission -Identity "[email protected]:\Calendar" -User "[email protected]" -AccessRights Editor
There is no existing permission entry found for user: Grace Rees.
    + CategoryInfo          : NotSpecified: (:) [Set-MailboxFolderPermission], UserNotFoundInPermissionEntryException
    + FullyQualifiedErrorId : [Server=EX01-2016,RequestId=480d0c12-0304-466c-af1e-c1487ad3e9cf,TimeStamp=3/21/2021 12:21:13 PM] [Fai
   lureCategory=Cmdlet-UserNotFoundInPermissionEntryException] EB810C8E,Microsoft.Exchange.Management.StoreTasks.SetMailboxFolderPe
  rmission
    + PSComputerName        : ex01-2016.exoip.local

为什么我们会收到此错误?没有找到用户的现有权限条目的解决方案是什么?

检查日历权限

使用 Get-MailboxFolderPermission cmdlet 检查用户 Grace Rees 是否已拥有 Amanda Morgan 日历的访问权限。运行 cmdlet 后,我们可以看到情况并非如此。

[PS] C:\>Get-MailboxFolderPermission -Identity "[email protected]:\Calendar" | ft Identity,FolderName,User,AccessRights

Identity                                             FolderName User      AccessRights
--------                                             ---------- ----      ------------
exoip.local/Company/Users/IT/Amanda Morgan:\Calendar Calendar   Default   {AvailabilityOnly}
exoip.local/Company/Users/IT/Amanda Morgan:\Calendar Calendar   Anonymous {None}

找不到用户现有权限条目的解决方法

解决方案是在该用户没有访问权限时使用 Add-MailboxFolderPermission cmdlet。如果该用户已有可用的访问权限,我们可以使用 Set-MailboxFolderPermission。

[PS] C:\>Add-MailboxFolderPermission -Identity "[email protected]:\Calendar" -User "[email protected]" -AccessRights Editor

FolderName           User                 AccessRights
----------           ----                 ------------
Calendar             Grace Rees           {Editor}

验证日历权限

使用 Get-MailboxFolderPermission cmdlet 验证日历访问权限。

[PS] C:\>Get-MailboxFolderPermission -Identity "[email protected]:\Calendar" | ft Identity,FolderName,User,AccessRights

Identity                                             FolderName User       AccessRights
--------                                             ---------- ----       ------------
exoip.local/Company/Users/IT/Amanda Morgan:\Calendar Calendar   Default    {AvailabilityOnly}
exoip.local/Company/Users/IT/Amanda Morgan:\Calendar Calendar   Anonymous  {None}
exoip.local/Company/Users/IT/Amanda Morgan:\Calendar Calendar   Grace Rees {Editor}

日历权限已设置。这次我们没有收到错误:没有找到用户的现有权限条目。

了解更多:使用 PowerShell 管理日历权限 »

结论

在本文中,您了解了为什么会出现“找不到用户错误的现有权限条目”的情况。解决方案是使用 Add-MailboxFolderPermission cmdlet 而不是 Set-MailboxFolderPermission,因为您需要向日历添加新的用户权限。

您喜欢这篇文章吗?您可能还喜欢使用 PowerShell 为所有用户设置默认日历权限。不要忘记关注我们并分享这篇文章。

您需要 登录账户 后才能发表评论

取消回复欢迎 发表评论:

关灯