【问题标题】:Create Retention Label Policy using PowerShell使用 PowerShell 创建保留标签策略
【发布时间】:2021-01-16 00:26:09
【问题描述】:

我正在尝试创建保留标签策略,我可以在其中对保留标签进行分组并使用 Powershell 发布到 SharePoint 站点。 想用powershell实现以下功能

“保留标签策略的主要目的是将一组保留标签分组并指定您希望这些标签出现的位置。”

Label Policy Img

【问题讨论】:

  • 你有任何你已经尝试过的代码吗?有关它如何失败和/或产生与您期望的结果不同的结果的详细信息在这里会有所帮助。您是否注意到此任务(或部分)有一个 PowerShell 示例脚本further along in the documentation?
  • 我没有得到任何 powershell cmdlet 来实现相同的目标。我看过示例脚本,但没有找到创建标签策略的代码
  • 我显然必须遗漏一些东西,因为示例脚本声称要解决以下主要步骤 Create retention labelsCreate retention policiesPublish retention labels for the policies。您是否阅读过 cmdlet New-RetentionCompliancePolicy 的文档?
  • New-RetentionCompliancePolicy 将创建保留策略,但我正在谈论添加屏幕截图的标签策略
  • 我不得不说,如果第二步的标题Step 2: Create a .csv file for the retention label policies 不能满足您的要求,它似乎会产生极大的误导。尤其是考虑到子步骤 3,Replace the examples with entries for your own retention label policies and their settings. For more information about the parameter values for this cmdlet, see New-RetentionCompliancePolicy.

标签: powershell sharepoint office365


【解决方案1】:

刚刚解决了这个问题,行为是:

  1. New-ComplianceTag(包含操作)
  2. New-RetentionCompliancePolicy(包含位置)
  3. New-RetentionComplianceRule(将操作绑定到位置)

虽然它在步骤 2 中看起来只是一个保留策略,但当您在步骤 3 中将其加入标签时,它变成了标签策略。

使用不同的标签和相同的策略(位置)重复第 3 步,将多个标签发布到相同的区域。

这是使用 2 个不同的标签但相同的策略执行第 3 步后在标签策略界面中的外观: Security and Compliance Centre Label Policy Screenshot

【讨论】:

    猜你喜欢
    • 2019-08-08
    • 1970-01-01
    • 1970-01-01
    • 2019-10-25
    • 2016-10-08
    • 1970-01-01
    • 2019-09-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多