- PowerShell 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| assets | ||
| .gitignore | ||
| AGENTS.md | ||
| i.ps1 | ||
| README.md | ||
| t3.json | ||
inventory
Spec inventory and health check for old Windows 10/11 PCs. Each run opens a
pull request here with the results (results/<service-tag>-<time>/).
Run it
First PC — open PowerShell as administrator and type:
irm https://forgejo.acyber.xyz/aporter/inventory/raw/branch/main/i.ps1 | iex
With a USB stick plugged in, the script copies itself there. On every other PC,
plug in the stick and double-click RUN-INVENTORY.cmd. The copy on the stick
updates itself from this repo whenever the PC is online.
No internet? Results wait in <USB>\inventory\pending and upload on the next
run that has internet. Uploaded ones move to uploaded\. private.txt (OEM
product key, local user names) stays on the stick and is never uploaded.
Telling machines apart
Every PC gets a short asset ID (PC-001, PC-002, ...) shown in a big banner
at the start and end of the run. Write it on a sticker on the case. A rerun on
the same PC reuses its ID. The script recognises the PC from a marker it leaves
on it (HKLM\SOFTWARE\Inventory), from a hardware fingerprint (SMBIOS UUID plus
serials), or from the service tag. The IDs are listed in
<USB>\inventory\machines.csv. Numbers also check earlier pull requests, so
they keep counting even with a different USB stick.
- PR title:
PC-003 | Dell Inc. Inspiron 3268 "nickname" | 8VD8MP2 | ALL GOOD - Files:
results/PC-003/<yyyyMMdd-HHmmss>/report.md+report.json. One folder per run, so reruns never overwrite each other.
What it checks
System model, service tag, BIOS, TPM, Secure Boot, Windows version and activation, CPU, RAM modules and slots, disks (health, SMART, wear, power-on hours, winsat read speed), free space, GPU and monitors, Ethernet, Wi-Fi scan, internet, clock drift (CMOS battery), audio, Bluetooth, webcam, optical drive, battery wear, Device Manager errors, 90 days of BSOD / power-loss / WHEA / disk errors, BitLocker and Windows 11 readiness. It also asks you to confirm the speaker test, optical tray, USB ports and display.
Wiping a PC
At the end of a run the script offers to wipe the PC. It only asks when the script runs as administrator and this run's results are already safe: uploaded, or saved on the USB stick. To wipe:
- Type the PC's asset ID (e.g.
PC-003). Anything else, or just Enter, skips. - Plug in the charger if it is a laptop. Windows Recovery must be enabled.
- Pull the USB stick out when told. Any key cancels.
- A 10 second countdown runs. Any key cancels.
Windows then restarts and does a "Remove everything + clean the drive" reset
(MDM RemoteWipe doWipeProtected). It can take hours; when it works it ends at
Windows setup.
Do not power the PC off. Windows Home cannot start this from a script, so the
script opens Settings > Recovery and you click Reset by hand. This is a Windows
reset, not certified data erasure. If the script says the outcome is unknown,
do not run it again; wait 10 minutes before resetting by hand.
Rerunning on a PC that was already inventoried is fine: it keeps its asset ID and adds a new result folder and pull request.
Upload credential
Uploads use a token for the inventory-bot account, which owns only a fork of
this repo and has no write access here. The token is temporary and is revoked
after the inventory day.