View installed OS Service Packs and Hotfixes Using Command Line

If you want to view a list of service packs or hotfixes installed in your system from the command line see below. You can even print it to a text or html file if needed.
This is done by using the WMIC (Windows Management Instrumentation Command Line).
So here goes: