Batch file to Display System information

A while ago I was asked about a “bat file” for getting system info. This one worked great, so I thought I would share…

What is a batch file?

A batch file is a type of script file commonly used in Windows operating systems. It contains a series of commands that are executed in sequence when the file is run. It allows you to automate tasks by running multiple commands without manual intervention.

The image above is what the output looks like when you run that bat file.

I called my bat file get-sys-info.bat-

I found the original script on the web, I’m not sure who the original author was and I did do some tweaking to suit what I needed, so, respect and thank you to the original writer.

This is the source for the Bat file.

@echo off
rem  Al McDivitt alsnerdnotes
rem  https://www.alsnerdnotes.com/
rem  get-sys-info.bat Display System information.
rem  Tribute is given to all the code I've seen over the years

echo Checking your system info, Please waiting...
systeminfo | findstr /c:"Host Name"
systeminfo | findstr /c:"Domain"
systeminfo | findstr /c:"OS Name"
systeminfo | findstr /c:"OS Version"
systeminfo | findstr /c:"System Manufacturer"
systeminfo | findstr /c:"System Model"
systeminfo | findstr /c:"System type"
systeminfo | findstr /c:"Total Physical Memory"
ipconfig | findstr IPv4
echo.
echo Hard Drive Space:
wmic diskdrive get size
echo.
echo Service Tag:
wmic bios get serialnumber
echo.
echo CPU:
wmic cpu get name
echo Task Completed!
pause

As mentioned, I saved mine as “get-sys-info.bat”

Then, at a command prompt –

Type c:\<path to bat file>\ get-sys-info.bat <enter> (On my PC I typed C:\ann-bat\get-sys-info.bat )

Don’t forget to press <enter> to run the bat file and display the information.

Hope this helps someone.

Cheer’ Al (alsnersnotes.com)

© 2024 Al’s Nerd Notes

DISCLOSURE: there are some affiliate links below and I may receive commissions on purchases made through links on this post