Tuesday, September 11, 2018

Useful Things: systeminfo

The systeminfo command on Windows is a useful little tool that gives information about the operating system on either a systelocal or remote computer that may aid you in troubleshooting. For example, if I want to see information about a computer called "remotepc", I could run:

systeminfo /s remotepc

and I would get back something like this (identifying information removed):

But what if you only wanted part of that information, perhaps to use in a script? The systeminfo command can be piped to find, like so:

systeminfo /s remotepc | find "OS Version"

which, in the above screenshot, would return:
("OS Version", of course, also happens to match the tail end of "BIOS Version".)

Additionally, you can ask the systeminfo command to output its data in a few different formats using the /FO switch. The default option, which displays as in the screenshot above, is LIST; other available formats are TABLE, which displays, as the name indicates, a table in the command line (though all data is on one line, so it is very difficult to read in the cmd window), and CSV, which echoes a comma-separated version of the information. Redirecting this output to a .csv file (systeminfo /FO CSV | info.csv) makes for easy Excel- or script-based parsing.

No comments:

Post a Comment

Tableau, TabPy, and the Case of No Input Rows

 I haven't scientifically confirmed this or anything, but it sure seems like if you pass an empty dataframe to a TabPy script, then no m...