Computer Inventory script (Powershell)

*** THIS SCRIPT IS PROVIDED WITHOUT WARRANTY, USE AT YOUR OWN RISK ***

This inventory script will collect the following data for each machine in livePCs.txt file.

Computer Name
Manufacturer
Model
CPU Type
System Type
Build Version
OS
Service Pack Version
Serial Number
IP Address
MAC Address
User Name that last logged in
Date/Time of last login
C: Free Space in GBs
Total Physical Memory
Date/Time of last Reboot

Usage:

Export a list of computers you want to Inventory from Active Directory, that’s the computers.txt file in the script. The script will test the connection to each machine and export the results to 1 of 2 txt files, livePCs.txt or deadPCs.txt. Once that is complete the inventory will begin using the livePCs.txt file, all the results will be exported to C:\scripts\pcInventory.csv.

Obviously if you don’t have a scripts folder on the C: it will error out.

 

 

Leave a Reply