Set-OrganizationSegment

此 Cmdlet 僅適用于安全 & 性合規性 PowerShell。 如需詳細資訊,請參閱 安全 & 性合規性 PowerShell

使用 Set-OrganizationSegment Cmdlet 來修改Microsoft Purview 合規性入口網站中的組織區段。 在您 套用資訊屏障原則之前,組織區段不會生效。

如需下方<語法>一節中參數集的詳細資訊,請參閱 Exchange Cmdlet 語法

Syntax

Set-OrganizationSegment
   [-Identity] <PolicyIdParameter>
   [-UserGroupFilter <String>]
   [<CommonParameters>]

Description

區段是使用 Azure Active Directory 中的特定 屬性 來定義。

若要在安全 & 性合規性 PowerShell 中使用此 Cmdlet,您必須獲指派許可權。 如需詳細資訊,請參閱 Microsoft Purview 合規性入口網站中的權限

範例

範例 1

Set-OrganizationSegment -Identity c96e0837-c232-4a8a-841e-ef45787d8fcd -UserGroupFilter "Department -eq 'HRDept'"

在此範例中,針對 GUID c96e0837-c232-4a8a-841e-ef45787d8fcd 的區段,我們已將部門名稱更新為 「HRDept」。

參數

-Identity

Identity 參數會指定您想要修改的組織區段。 您可以使用可唯一識別區段的任何值。 例如:

  • 名稱
  • 辨別名稱 (DN)
  • GUID
Type:PolicyIdParameter
Position:0
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False
Applies to:Security & Compliance

-UserGroupFilter

UserGroupFilter 參數會使用 OPATH 篩選語法來指定組織區段的成員。 例如,語法 ("Property -ComparisonOperator 'Value'""MemberOf -eq 'Engineering Department'""ExtensionAttribute1 -eq 'DayTrader'") 。

  • 以雙引號 「」 括住整個 OPATH 篩選準則。 如果篩選條件包含系統值 (例如 $true$false$null),請改為使用單引號 ' '。 雖然此參數是字串 (不是系統區塊),您也可以使用大括弧 { },但只有在篩選條件不包含變數時。
  • Property 是可篩選的屬性。 如需詳細資訊,請參閱 資訊屏障原則的屬性
  • ComparisonOperator 是 OPATH 比較運算子 (例如 -eq equals 和 -like 字串比較) 。 如需比較運算子的詳細資訊,請參閱 about_Comparison_Operators
  • Value 是要搜尋的屬性值。 以單引號括住文字值和變數 ('Value''$Variable')。 如果變數值包含單引號,您必須識別 (逸出) 單引號,以正確展開變數。 例如,使用 '$($User -Replace "'","''")',而不是 '$User'。 請勿以引號括住整數或系統值 (例如,請改用 500$true$false$null) 。

針對所有區段使用相同的屬性,並確認您的區段未重迭 (使用者必須只指派給一個區段) 。

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance