SharePoint On-Premises : PowerShell script to find out last content modified of all site collections in a web application – required in SharePoint migration

SharePoint On-Premises : PowerShell script to find out last content modified of all site collections in a web application – required in SharePoint migration