There are many ways how to do this and many different command lines or scripts available. Personally I like this command line to be use to query all service packs, patches or hot fixes installed on the remote machine and the list exported into text or CSV file for archiving. I am will use the WMIC (Windows Management Instrumentation Command-line) There is a lot what you can do with use WMIC on your network.
- go to start / run and type cmd
- Press OK
- use cd .. to get into c:> prompt
- type this command to start the query and export into file
wmic /node:’computer name‘ qfe GET description, hotfixid, installedby, installedon,servicepackineffect > Computer.txt
What it does, it will connect to the remote machine, make query and generate output filecomputer.txt with the requested details from the remote machine.