Skip to content
Menu

Hardware and OS Inventory

Reports the facts an asset record needs: make, model, serial, BIOS, CPU, RAM, disks, Windows version, domain or Entra join, and TPM version. Read-only.

Hardware and OS inventory is free for members.

Enter your email to create your free account and get the file.

We'll email you the script and the weekly MSP Outpost email. Unsubscribe anytime. Privacy policy.

Already a member? Sign in.

Be the first to review Hardware and OS inventory. Tell other MSPs how it worked for you.

Write a Review

LanguagePowerShell
Runs onWindows 10, Windows 11, Windows Server 2016+; runs as SYSTEM
NeedsPowerShell 5.1, administrator rights
Read-onlyReads, changes nothing

What It Does

The script reads the facts an asset record needs and writes one Property and Value row for each: manufacturer, model, serial number and BIOS; the CPU with its cores and logical processors; installed RAM; each internal disk with its model, size and type; the Windows edition, version, build, architecture, install date and last boot; the domain or workgroup; the Entra ID join state; and the TPM version.

Dates are written in UTC in ISO 8601, so rows from machines in different time zones sort together. USB disks are not listed.

If you name a custom field in ResultField, the script writes the manufacturer, model and serial number to it as one line, which makes a usable asset tag in most RMMs. It changes nothing on the machine.

Before You Run It

  • Run it with administrator rights. Some facts, such as the TPM version, cannot be read without them.
  • Pick the custom field for the asset tag in your RMM before you schedule it across a client.
  • Use OutputFormat=Csv or ExportPath when you want the rows in a spreadsheet rather than in the RMM output.

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 20 seconds.
  • Example answer: "Dell Latitude 5440, serial 7XK2QY3; Windows 11 Pro; 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.

The Script

get-hardware-inventory.ps1 · 851 lines · 43.1 KB

Free for Members

Create a free account or sign in to read, copy and download this script.

Welcome Back

Sign in to your MSP Outpost account.