Yes, you can absolutely check for system updates on your Windows Server 2016/2019 servers programmatically using a C# application, which will significantly reduce the cumbersome manual checking process. For .NET Framework 4.8 or .NET 7 (or lower) environments, the most reliable and effective method is to leverage the Windows Update Agent (WUA) API.
The WUA API is a COM (Component Object Model) interface provided by Microsoft that allows applications to interact with the Windows Update service. Through this API, you can programmatically search for updates, check their status, download them, and even initiate their installation.
Reliability: It directly interfaces with the core Windows Update mechanism, ensuring the most accurate and up-to-date information.
Comprehensive Control: Beyond simply detecting if updates are available, you can retrieve detailed information about pending updates (like KB Article IDs, titles) and even control the download and installation process.
System Built-in: The WUA agent is typically installed by default on all modern Windows systems, eliminating the need for additional third-party module installations (like specific PowerShell modules).
No External Server Required: Unlike the WSUS API, it does not require a central WSUS server, making it suitable for both small and large-scale deployments.
If you'd like more details on how to implement this, please let me know.