APOPS Assurance

IT audit scripts: collect evidence faster on Windows, Linux and macOS

How read-only audit scripts help IT auditors and administrators gather evidence such as computer inventories, and how to run them safely on Windows, Linux and macOS.

Updated 2026-11-25 · APOPS Assurance

Auditors and IT teams spend hours collecting the same evidence: which computers exist, what they run and who uses them. Small scripts collect that evidence in a consistent format, so the results can be compared across sites and from one year to the next.

What makes a good audit script

  • Read-only: it reads settings and writes a report, and never changes the system it checks.
  • Offline: it sends nothing over the internet, so evidence stays under your control.
  • Readable: plain text that the system owner can inspect before it runs.
  • Repeatable: the same output columns every time, ready to import into a register or checklist.

How to run audit scripts safely

  • Agree the scope with the system owner and record the approval.
  • Open the script in an editor and check it before running it.
  • Run it with the lowest rights that give complete results; use administrator or sudo only when the steps say so.
  • Keep the output file with your working papers and note the date it was collected.

Windows, Linux and macOS

  • Windows: a .bat file runs with a double-click. If SmartScreen warns you, choose More info and Run anyway after checking the file.
  • Linux: make the .sh file runnable with chmod +x, then run it with sudo when hardware serial numbers are needed.
  • macOS: run the .sh file with sh in Terminal and allow folder access if macOS asks.

Available now

The computer inventory script collects the make, model, serial number, operating system, CPU, RAM, disk, IP and MAC address, user and antivirus of each computer into one CSV that matches the Computer Inventory Register template. More audit scripts are added to the Audit scripts section over time.

Templates for this guide

More guides

Need help to pay?