Set-FeatureConfiguration
此 Cmdlet 僅適用於安全性與合規性 PowerShell。 如需詳細資訊,請參閱 安全性與合規性 PowerShell。
注意事項
此 Cmdlet 目前可在公開預覽版中使用,並非所有組織都提供,而且可能會變更。
使用 Set-FeatureConfiguration Cmdlet 來修改組織內Microsoft Purview 功能設定,包括:
- 集合原則。
- 進階標籤型保護。
如需下方<語法>一節中參數集的詳細資訊,請參閱 Exchange Cmdlet 語法。
語法
Set-FeatureConfiguration
[-Identity] <PolicyIdParameter>
[-Locations <String>]
[-Comment <String>]
[-Confirm]
[-Mode <PolicyMode>]
[-ScenarioConfig <String>]
[-WhatIf]
[<CommonParameters>]
Description
若要在安全性與合規性 PowerShell 中使用此 Cmdlet,您必須獲得指派權限。 如需詳細資訊,請參閱 安全性 & 合規性中的許可權。
範例
範例 1
Set-FeatureConfiguration "DSPM for AI - Capture interactions for Copilot experiences" -ScenarioConfig '{"Activities":["UploadText","DownloadText"],"EnforcementPlanes":["CopilotExperiences"],"SensitiveTypeIds":["All"],"IsIngestionEnabled":false}'
此範例會更新名為「適用於 AI 的 DSPM - 針對 Copilot 體驗擷取互動」的收集原則,以停用內容擷取。
範例 2
Set-FeatureConfiguration "Microsoft Copilot collection policy for Contoso Sales" -Locations '[{"Workload":"Applications","Location":"52655","AddInclusions":[{"Type":"Group","Identity":"USSales@contoso.com"}]}]'
此範例會更新名為 「Microsoft Copilot Collection policy for Contoso Sales」 的收集原則,以包含群USSales@contoso.com組。
範例 3
Set-FeatureConfiguration "Microsoft Copilot collection policy for Contoso Sales" -Locations '[{"Workload":"Applications","Location":"52655","AddExclusions":[{"Type":"IndividualResource","Identity":"adele@contoso.com"}]}]'
此範例會更新名為 「Microsoft Copilot Collection policy for Contoso Sales」 的收集原則,以排除 adele@contoso.com。
參數
-Comment
Comment 參數會指定選擇性註解。 如果指定的值含有空格,則必須以雙引號 (") 括住值,例如︰"This is an admin note"。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
適用於: | Security & Compliance |
-Confirm
Confirm 參數會指定要顯示或隱藏確認提示。 這個參數對 Cmdlet 的影響取決於 Cmdlet 是否需要確認才能繼續作業。
- 破壞性的 Cmdlet (如 Remove-* cmdlets) 有內建暫停,它會先強迫您確認命令才會繼續作業。 對於這些 Cmdlet,您可以使用以下確切語法來略過確認提示:
-Confirm:$false
。 - 其他大部分的 Cmdlet (如 New-* 和 Set-* cmdlets) 則沒有內建暫停。 在使用這些 Cmdlet 時,指定不含任何值的 Confirm 參數會引入強迫您認可命令後才繼續作業的暫停。
類型: | SwitchParameter |
別名: | cf |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
適用於: | Security & Compliance |
-Identity
Identity 參數會指定您想要修改的功能組態。 您可以使用唯一識別原則的任何值。 例如:
- 名稱
- 辨別名稱 (DN)
- GUID
類型: | PolicyIdParameter |
Position: | 1 |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
適用於: | Security & Compliance |
-Locations
locations 參數會指定套用功能組態的位置。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
適用於: | Security & Compliance |
-Mode
Mode 參數會指定功能組態模式。 有效值為:
- 啟用:已啟用功能組態。
- 停用:功能組態已停用。
類型: | PolicyMode |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
適用於: | Security & Compliance |
-ScenarioConfig
ScenarioConfig 參數會指定功能組態的其他相關信息。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
適用於: | Security & Compliance |
-WhatIf
WhatIf 參數會模擬命令的動作。 使用此參數時,您不需要實際套用變更即可檢視可能會發生的變更。 您不需要使用此參數指定值。
類型: | SwitchParameter |
別名: | wi |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
適用於: | Security & Compliance |