Hello All,
I have the below posh command which return me a last patch and HotFix ID from all systems so I wanted to know how can I schedule as a report from SCCM server.
$lastpatch= Get-HotFix | Sort-Object InstalledOn -Descending | select-object -first 1 | Select-Object InstalledOn, HotfixID
"{0:MM/dd/yyyy} - {1}" -f $lastpatch.InstalledOn,$lastpatch.HotfixID | Write-Output