Skip to Content

Scripts to get computer information

CASIT Desktop services inventories a lot of computers and to help I had written a Java app that pulls a computer’s information and sends the data to the CASIT inventory site. With Java suffering from major exploits, I decided to convert the app from Java to AppleScript for Macs and PowerShell for Windows. The coding for the scripts was pretty easy to write after I figured out the syntax, and I also found some helper functions from online sources that helped quite a bit. The scripts run really fast and are also easy to edit by just opening them in AppleScript Editor or Windows PowerShell ISE on any computer.

AppleScript

Here is the code. To execute it, just open it in AppleScript Editor and hit ‘Run’.

Screenshot

Computer Info AppleScript

Links

PowerShell

Here is the code. To execute the script either right+click and select ‘Run with PowerShell’. To execute the script you might need to set PowerShell execution to unrestricted with this command: Set-ExecutionPolicy -ExecutionPolicy Unrestricted

Screenshot

Computer Info PowerShell

Links