Sometimes you may check your Agent Managed view to see if any agents are grey or not being monitored. You might want to know when they last reported.
This is a PowerShell script that quickly finds the last time an agent checked in with SCOM and saves that information to a file. You can modify the script by changing the “$agents” variable to support either a single name or multiple names. The PowerShell script is available on my GitHub:
https://github.com/tfziegler/Useful-SCOM-PowerShell-Queries/blob/main/SCOMAgentReportTime.ps1
Results