I am looking for a command line to get the information available here:
The motivation is that I would like to know if the failure notifications pile up, but counting them in the GUI is insane, I would like to script it.
What you're looking at are called "Features On Demand", those can be installed directly from the internet or a WSUS server, which might be another place where you can check for logs.
They can be controlled using DISM and PoweShell, you can get the status of the features using the following commands:
CMD: DISM /Online /Get-Capabilities
PowerShell (same output as DISM): Get-WindowsCapability -online
References:
https://docs.microsoft.com/en-us/powershell/module/dism/get-windowscapability?view=win10-ps