What It Does
The script reads local facts only, with no PSA and no internet, and writes one row per fact: computer name, Windows edition, version and build, install date, uptime in days, the newest installed update and its date, whether a restart is pending, Microsoft Defender state and signature age, BitLocker protection of the system drive, free space in percent and GB, installed RAM, processor, manufacturer, model and BIOS serial number.
For the last patch, it compares installed hotfixes with the newest successful install in the latest 300 Windows Update history entries, skipping definition and other antivirus update entries in that history. A pending restart counts the Windows servicing and Windows Update flags, not pending file renames, which are common and noisy. Some missing facts, such as patch date or free space, show as Unknown. Errors reading core system information can stop the run.
Warranty is not included because it needs the manufacturer's service; get-warranty-status does that. The install date is the date of the last Windows feature update, not the date the PC was bought. The script changes nothing.
A fictional PC could return three Fact and Value pairs in the same report. “Restart pending” is “Yes (Windows Update)”, “Free space C: (%)” is “12.5”, and “BitLocker C:” is “On”. Exported CSV uses one row per fact. These sample values describe one device.
Use the restart flag to agree a maintenance window with the client. Check the disk against the client’s free-space threshold, then rerun the report to document the result. A fleet-wide QBR needs reports from each in-scope PC plus the reporting period and device count.
Before You Run It
- Run it as SYSTEM so it can read BitLocker and Defender.
- Use OutputFormat Json or Csv, or ExportPath, to collect the rows from many PCs into one review.
- Pair it with get-warranty-status if the review covers warranty dates.
Type and Risk
- Type: Report. It collects facts into a table and never alerts. It exits 0, or 2 when it could not run.
- Risk: Low. It reads and changes nothing.
- Restart: It never restarts the machine.
- Typical run: Under 30 seconds.
- Example answer: "DESK-014: Windows 11 Pro 24H2 (26100.2605), patched 9 days ago, Defender on (signatures 0 d), BitLocker on, C: 41% free, 16 GB RAM"
- Tested before listing on Windows 11 with Windows PowerShell 5.1, run as SYSTEM, against its own test cases.
Inputs
Pass an input as an argument (-Name value), as an environment variable with the same name, which is how most RMMs pass script variables, or change its default in the param() block at the top of the script. An argument wins over an environment variable, which wins over the default.
This script has no inputs of its own.
Every script also takes DryRun, OutputFormat (Text, Answer, Json or Csv), ExportPath and ResultField, which writes the answer to an RMM custom field.
License
Provided "as is" under the MIT License, without warranty of any kind. Test before production use. MSP Outpost and User First Digital Inc. accept no liability for any damage or loss.