Validate-RetentionRuleQuery

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

使用 Validate-RetentionRuleQuery Cmdlet 驗證保留規則的 關鍵字查詢語言 (KQL) 內容搜尋篩選。

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

語法

Default (預設值)

Validate-RetentionRuleQuery
    -KqlQueryString <String>
    [<CommonParameters>]

Description

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

範例

範例 1

Validate-RetentionRuleQuery -KqlQueryString 'from:"Ann Beebe" AND subject:northwind'

此範例會驗證指定的 KQL 內容搜尋篩選。

參數

-KqlQueryString

適用:Exchange Online、安全性 & 合規性

KqlQueryString 參數會指定您要驗證的 KQL 文字搜尋字串。

此參數使用利用關鍵字查詢語言 (KQL) 格式化的文字搜尋字串或查詢。 如需詳細資訊,請參閱 關鍵字查詢語言 (KQL) 語法參考和電子文件探索的關鍵字查詢和搜尋條件。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

CommonParameters

此 Cmdlet 支援常見參數: -Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters。