CmdID / PowerShell / Cmdlets / Validate
Validate-RetentionRuleQuery
Use the Validate-RetentionRuleQuery cmdlet to validate the Keyword Query Language (KQL) content search filters for retention rules. Exchange PowerShell reference
From the Exchange PowerShell reference 1 parameter Its page in the reference
Parameters
-KqlQueryStringThe KqlQueryString parameter specifies the KQL text search string that you want to validate.