Computer Inventory Script (Windows, Linux, macOS)
Read-only script that collects a computer's make, model, serial number, OS, CPU, RAM, disk, IP and MAC address, user and antivirus into a CSV for your computer inventory register.
Windows (.bat)Linux (.sh)macOS (.sh) USD 3.00 for all versions · read-only · 1 hour 30 minutes to download
Pay via M-Pesa, Airtel Money and local mobile money across East Africa, or by Visa / Mastercard. How to pay
| Script | Computer Inventory Script (Windows, Linux, macOS) |
|---|---|
| Platform | Windows, Linux, macOS |
| Audit area | IT asset inventory |
| Purpose | Fills the computer inventory register from the computers themselves, so serial numbers, specs and network details are complete and correct. |
| Price | USD 3.00, all platform versions |
Prerequisites
- Windows 7 or newer (PowerShell is built in), any Linux with /bin/sh, or macOS
- Administrator (Windows) or sudo (Linux) only for the serial number; everything else works as a normal user
Walking from desk to desk to copy serial numbers, RAM and IP addresses is slow and full of typing mistakes. Run this script once on each computer: it reads the details from the operating system and adds one line to a CSV file. Import the CSV into the Computer Inventory Register template and the register is filled in for you.
What the script checks
- Computer name, asset type (laptop, desktop, server, virtual machine)
- Manufacturer, model and serial number
- Operating system, version and build
- CPU, RAM and total and free disk space
- IP address and MAC address of the main network card
- Logged-in user and domain or workgroup
- Antivirus product and date of the last OS update
- Date collected
CSV columns: Asset tag, Computer name, Asset type, Manufacturer, Model, Serial number, Operating system, OS version / build, CPU, RAM (GB), Disk (GB), Disk free (GB), IP address, MAC address, Logged-in user, Domain / workgroup, Antivirus, Last OS update, Assigned user, Location, Status, Collected on. They match the Computer Inventory Register template.
- The full script for Windows, Linux, macOS
- How to open the correct console, and the permissions it needs (least privilege)
- Step-by-step instructions
- The expected output and how to interpret it
Also included in the zip as README-how-to-run.txt. Follow the audit process guide for scope, authorisation and evidence.
Safe by design
- Read-only: installs nothing and changes no settings.
- Sends nothing to our servers; results stay on your computer.
- Secrets are masked and password hashes are never printed.
- Plain text: open it in any editor and check every line before running it.
Also known as: computer inventory script, PC inventory batch file, hardware inventory script windows, linux hardware inventory script, macOS inventory script, IT asset audit script, collect computer details script, serial number script, computer audit bat file, IT audit scripts.
Templates to use with this script
Guides
More audit scripts
Questions
Is the computer inventory script safe to run?
Yes. It only reads information and writes its results next to itself. It installs nothing, changes no settings and sends nothing to our servers. Secrets it finds are masked, and password hashes are never printed. It is plain text: open it in any editor to check every line before you run it.
How do I get the script?
Click "Get script", pay USD 3.00 through APOPS Pay (M-Pesa, Airtel Money, local mobile money across East Africa, or Visa / Mastercard payment), then download the Windows, Linux, macOS versions. One payment covers every operating system.
How long can I download it?
For 1 hour 30 minutes after payment, as often as you like. You are told this before you pay. Keep the zip: the script itself never expires.
Do I need administrator rights?
Administrator (Windows) or sudo (Linux) only for the serial number; everything else works as a normal user
What do I get after paying?
The full script for each platform, how to open the correct console, the permissions it needs, step-by-step instructions, the expected output and how to read the results. They are shown on this page and included as a README in the zip.