PowerShell Script to Generate a Windows System Inventory
This PowerShell script generates a complete Windows system inventory, including hardware details, OS version, BIOS information, and uptime. The output is automatically written to a timestamped TXT file in C:\Scripts, making it ideal for IT support, MSP workflows, and asset documentation.
Introduction
Windows administrators frequently need a fast and reliable way to collect system information without relying on third-party tools. This Anavem PowerShell script provides a clean, read-only system inventory that can be executed locally, via Intune, or through RMM platforms.
Output Location
The script automatically creates the following directory if it does not exist:
C:\Scripts
A timestamped TXT file is generated on each execution.
How to Run the Script
Method 1 - Manual execution
powershell -ExecutionPolicy Bypass -File .\Anavem-SystemInventory.ps1
Method 2 - Intune / RMM
Use the script as a detection or reporting task. No admin privileges required.
Script Code
Security Notes
This script performs read-only CIM queries and does not modify the system, registry, or network configuration. It is safe to run in production environments.
Comments
Want to join the discussion?
Create an account to unlock exclusive member content, save your favorite articles, and join our community of IT professionals.
New here? Create a free account to get started.