CmdID / PowerShell / Cmdlets / Test
Test-Message
Use the Test-Message cmdlet to simulate and report on the effects of mail flow rules (transport rules) and unified DLP rules on test email messages. Exchange PowerShell reference
From the Exchange PowerShell reference 9 parameters Its page in the reference
Parameters
-RecipientsThe Recipients parameter specifies the recipient email address to use for the test message.-SendReportToThe SendReportTo parameter specifies the target email address for the command results.-TransportRulesThe TransportRules switch specifies that you want to test mail flow rules.-UnifiedDlpRulesThe UnifiedDlpRules switch specifies that you want to unified DLP rules.-Confirm, -cfThe Confirm switch specifies whether to show or hide the confirmation prompt.-ForceThe Force switch specifies whether to suppress warning or confirmation messages.-MessageFileDataThe MessageFileData parameter specifies the .eml message file to test.-SenderThe Sender parameter specifies the sender email address to use for the test message.-WhatIf, -wiThe WhatIf switch shows what the command does without making any changes.