Saturday, January 21, 2012

Simple Script to audit iMacs, Macbooks

I wrote this script a few months back as part of a project.

Purpose:
To gather hardware, software and storage information about the Macintosh machine. It works on all variants of mac from mac OS X. Does not work on Mac OS 9 and below. 

Technique:

Simple bash scripting. No rich UI. Easy to run from the terminal.

License:
 GPL

Code:

system_profiler get SPHardwareDataType SPSoftwareDataType SPNetworkDataType SPMemoryDataType SPSerialATADataType > ~/Desktop/macaudit.txt  
uname -a >> ~/Desktop/macaudit.txt

Instructions:
Copy and paste the above code and save the file as macaudit.command
When you double click on the file, you will get a txt file named macaudit.txt in your Desktop.
You can also make this user interactive if you require.