Tuesday Tooling: Windows SystemInfo
Learn more about your Windows installation, via the Command Line!
I cut my teeth in MS-DOS. In 1993/4 I had a 486 DX 33 with 4MB of RAM and a 120MB hard drive. It was just enough to play Star Wars: X-Wing if you didn't load it from Windows 3.1. So using a few batch files I made a menu which would enable me to load up the computer and play my games. I loved MS-DOS and it set up my love for the Linux Terminal.
Batch file?
Batch files have an file extension of.BAT
and they are small scripts which contain information to setup a computerAUTOEXEC.BAT
is an example of a batch script.
@ECHO OFF
PROMPT $P$G
PATH C:\DOS;C:\WINDOWS
SET TEMP=C:\TEMP
SET BLASTER=A220 I7 D1 T2
LH SMARTDRV.EXE
LH DOSKEY
LH MOUSE.COM /Y
So what prompted this post?
I saw a tweet from Paul Winstanley which intrigued me.
Why have I only just learned about the systeminfo command? 🤦 #Windows #Windows10 #OldStuffNewStuff pic.twitter.com/xiuUti8dLU
— Paul Winstanley [MVP] (@SCCMentor) June 22, 2020
Thanks Paul!
So what is this post all about?
Well dear reader, the Command Prompt still exists in Windows 10 and we can use it to get quick information. One common task for System Administrators is to get data about a machine.
Hi reader!
So what is systeminfo?
Systeminfo is a tool to get information on your system or for a remote system.
The default command is systeminfo
and it will return something like the above image. Lots of data which we can use! Lovely!
So yeah that is handy but it is still just a long list of text.
I hear ya, and yeah it is handy but we need it in a better format. Fear not we can manipulate the output.
Table
To write the output to a file called mypc.txt
in a table format.
systeminfo /fo TABLE > mypc.txt
List
This is the default option, which prints that massive amount of text to the screen. But we can also save the output to a file.
systeminfo /fo LIST > mypc.txt
CSV
If you need the data in a spreadsheet / database format, then CSV is just what you need.
systeminfo /fo CSV > mypc.csv
Get the details from a remote machine!
Note: This requires an RPC server to be running on the remote machine, and obviously the firewall open to this connection.
For example lets connect to my laptop.
systeminfo /s TeclastF5 /u cooldomain\biglesp /p gr3gg5 /fo csv > TeclastF5.csv
No that isn't my password! :D