There are dozens/hundreds of usecases what you can do with Exchange powershell cmdlets.
This kbase shows you a simple configuration how you can utilize the Test-Mailflow cmdlet with the GL MS Powershell Sensor for an on-premises Exchange Server .
Requirements
Before you start the configuration, please make sure that you cover the following requirements on the Exchange Server Level:
Enable-PSRemoting –force
set-item -force WSMan:\localhost\Service\Auth\Basic $true
set-item -force WSMan:\localhost\Client\AllowUnencrypted $true
set-item -force WSMan:\localhost\Service\AllowUnencrypted $true
Depending on your requirements you could configure encrypted powershell communication as well (a bit more to configure) : Using SSL for Remote PowerShell in GreenLight
Create an Authentication Profile
Add Server
Add your on-premises Exchange server to the GreenLight Server list and select "OS Services,PerfCounters, Powershell" and "MS Exchange"
Configure MS PowerShell Sensor
Output:
I assume the important output line is, if the Result shows "Success" or "Failed"