I know something like this already exists somewhere, and absolutely open to learning better ways:

https://github.com/mubix/Find-WSUS

For finding what might be affected by CVE-2025-59287 or you can use an EDR / OSQuery to find systems with the WSUSService service.

GitHub - mubix/Find-WSUS: Helps defenders find their WSUS configurations in the wake of CVE-2025-59287

Helps defenders find their WSUS configurations in the wake of CVE-2025-59287 - mubix/Find-WSUS

GitHub