I like sending little PowerShell tweet tips, but this one is a bit too long for Twitter. Here is a one-liner to remove all but the most recent job result for each job name.
Manage and Report Active Directory, Exchange and Microsoft 365 with
ManageEngine ADManager Plus - Download Free Trial
Exclusive offer on ADManager Plus for US and UK regions. Claim now!
ManageEngine ADManager Plus - Download Free Trial
Exclusive offer on ADManager Plus for US and UK regions. Claim now!
get-job | group Name | foreach { $_.group | sort PSEndTime -descending | Select -skip 1 | remove-job -whatif}
This assumes you have no jobs running and that you have multiple results for each job name which you might if you are running scheduled PowerShell jobs. In fact, I will be talking about scheduled jobs at the PowerShell Summit next week.