I spent some time looking, the options are awful, surely MS need to sort this out.
I have used the below which is lengthy, copy all to use including the blocks to the "endregion send email":
Credit to https://github.com/proxb/WSUSReport/blob/master/WSUSReport.ps1 for the main script, I had challenges to get the server updated needed count included.
I added to line 275 or after Sort Computername in "#Failed Installations" Section:
#Needed Count
$computerscope = New-Object Microsoft.UpdateServices.Administration.ComputerTargetScope
$updatescope = New-Object Microsoft.UpdateServices.Administration.UpdateScope
$GroupNeededHash=@{}
$ComputerUpdatesNeeded = $wsus.GetSummariesPerComputerTarget($updatescope,$computerscope) | Select @{L='ComputerTarget';E={($wsus.GetComputerTarget([guid]$_.ComputerTargetId)).FullDomainName}}, `
@{L='NeededCount';E={($_.DownloadedCount + $_.NotInstalledCount)}} | Where-Object { $_.NeededCount -ne '0' }| Sort NeededCount -Descending | ForEach {
}
and then to line 538 or after "#endregion Failed Update Install":
#region Needed Update Install
$Pre = @"
<div style='margin: 0px auto; BACKGROUND-COLOR:RED;Color:Black;font-weight:bold;FONT-SIZE: 14pt;'>
Needed Update Installations By Computer
</div>
"@
$Body = $wsus.GetSummariesPerComputerTarget($updatescope,$computerscope) | Select @{L='ComputerTarget';E={($wsus.GetComputerTarget([guid]$_.ComputerTargetId)).FullDomainName}}, `
@{L='NeededCount';E={($_.DownloadedCount + $_.NotInstalledCount)}} | Where-Object { $_.NeededCount -gt '4' }| Sort NeededCount -Descending | ConvertTo-Html -Fragment | Out-String | Set-AlternatingCSSClass -CSSEvenClass 'even' -CssOddClass 'odd'
$Post = "<br>"
$htmlFragment += $Pre,$Body,$Post
#endregion Needed Update Install