SCCM Hardware Inventory with Verification
Mick's IT Blog
SEPTEMBER 15, 2017
This script will initiate a hardware inventory. It scans the InventoryAgent.log file for the initiation of the hardware inventory and then for the completion. The purpose of this is to verify a hardware inventory was actually initiated. I have had instances where I would execute a hardware inventory multiple times not knowing if it actually occurred. The script will return an error code 1 if the initiation was ignored or it exceeded five minutes.