A production-style PowerShell inventory reporting tool that collects system, disk, Windows service, installed software, and network configuration information from multiple servers and exports results to CSV, HTML, and JSON.
PowerShell Server Inventory Report is designed for System Administrators who need a quick, repeatable way to document server hardware, operating system details, and disk usage across one or many systems. The script uses CIM/WMI for remote collection, evaluates server and disk health, and exports professional reports suitable for audits, change records, and portfolio demonstrations.
Current Version: v1.6
- Collects computer name, OS, manufacturer, model, and serial number
- Reports total and free physical memory in GB
- Retrieves BIOS version, CPU name, and system uptime
- Gathers disk drive letter, total size, and free space per volume
- Exports combined inventory to
InventoryReport.csv - Generates a formatted
InventoryReport.htmlreport - Includes comment-based help and
try/catcherror handling - Displays results in the console and saves files to the
reportsfolder
- Disk Health Status — Automatic Healthy / Warning / Critical classification per drive
- Color-Coded HTML Report — Status badges with green, orange, and red styling
- Summary Dashboard — Drive health overview in the HTML report
- Improved System Layout — Property | Value table format (single-server HTML, superseded by v1.2 dashboard for multi-server)
- Report Generation Details — Footer shows script name, current user, and report version
- Multi-Server Support — Reads server names from
servers.txt - Remote Collection — Gathers inventory from remote servers via CIM
- Server Health Evaluation — Healthy / Warning / Critical based on worst disk status
- Unreachable Server Handling — Failed servers recorded as
Unreachablewithout stopping execution - Dashboard Summary — Total, Healthy, Warning, Critical, and Failed server counts
- Server Status Table — All servers with inventory and health status in HTML
- Disk Details Table — Combined disk inventory across all servers
- JSON Report — Exports
InventoryReport.jsonalongside CSV and HTML - InfraOps Dashboard Ready — Structured camelCase JSON designed as a collector engine for the future InfraOps Dashboard web application
- Machine-Readable Output — Includes server summary, server inventory, disk details, and failed server records
- API-Friendly Schema — Consistent property names suitable for ingestion by web dashboards and automation pipelines
- Windows Services Inventory — Monitors operationally important services per server
- Service Health Monitoring — Healthy / Warning / Critical / Unknown evaluation
- Critical Service Detection — Flags stopped automatic services as critical
- Service Health Dashboard — HTML summary cards and service inventory table
- Service JSON Export —
servicesarray inInventoryReport.json - Service CSV Export —
RecordType: Servicerows inInventoryReport.csv
- Installed Software Inventory — Collects applications from Windows uninstall registry keys
- Software Asset Reporting — Publisher summary and package counts per server
- Publisher Summary — Top publishers displayed in console and HTML dashboard
- Software Inventory Dashboard — Scrollable HTML table for large software inventories
- Software JSON Export —
softwarearray inInventoryReport.json - Software CSV Export —
RecordType: Softwarerows inInventoryReport.csv - Software Filtering — Optional
-SoftwareFilterparameter for CSV, HTML, and JSON exports
- Network Inventory — Collects active physical and virtual network adapter configuration
- Network Health Monitoring — Healthy / Warning / Critical evaluation per adapter and server
- DHCP Detection — Reports DHCP-enabled vs static IP adapters
- DNS Inventory — Collects configured DNS servers per adapter
- Gateway Inventory — Reports default gateway per adapter
- Adapter Status Monitoring — Up, Disconnected, and Disabled adapter states
- Network JSON Export —
networkSummaryandnetworksinInventoryReport.json - Network CSV Export —
RecordType: Networkrows inInventoryReport.csv - Network Filtering — Optional
-NetworkFilterparameter for CSV, HTML, and JSON exports
The collector gathers five inventory layers per server:
| Layer | Data Collected |
|---|---|
| Servers | OS, hardware, BIOS, CPU, RAM, uptime, server health status |
| Disks | Drive letter, size, free space, free percent, disk health status |
| Services | Service name, display name, status, start type, service health status |
| Software | Display name, version, publisher, install date, estimated size |
| Network | Adapter name, status, MAC, IP, subnet, gateway, DNS, DHCP, link speed |
| Format | Output File | Use Case |
|---|---|---|
| CSV | InventoryReport.csv |
Spreadsheets, audits, data analysis |
| HTML | InventoryReport.html |
Human-readable dashboard reports |
| JSON | InventoryReport.json |
InfraOps Dashboard and automation pipelines |
Create or edit servers.txt in the project root:
# Production servers
localhost
SRV01
SRV02
# Add one server name per line
# Lines starting with # are ignored
# Blank lines are skipped
Each disk is evaluated based on free space percentage (FreePercent):
| Free Space | Status | Meaning |
|---|---|---|
| ≥ 20% | Healthy | Adequate free space |
| 10% – 19.9% | Warning | Low free space — plan cleanup or expansion |
| < 10% | Critical | Very low free space — immediate attention recommended |
| Condition | Health Status |
|---|---|
| Service exists and is Running | Healthy |
| Service exists, Stopped, StartType = Manual | Warning |
| Service exists, Stopped, StartType = Automatic | Critical |
| Service not found | Unknown |
Configurable in ServerInventoryReport.ps1 via $MonitoredServices:
WinRM, W32Time, EventLog, LanmanServer, LanmanWorkstation, Spooler, Dhcp, Dnscache, RemoteRegistry, Schedule, BITS
| Condition | Health Status |
|---|---|
| Adapter status is Up | Healthy |
| Adapter status is Disconnected or Disabled | Warning |
| No active adapter with an IP address detected | Critical |
Server-level network health (networkHealthStatus) is evaluated from all collected adapters. If no adapter is Up with an IP address, the server network status is Critical. If any adapter is disconnected while at least one active IP exists, status is Warning. Otherwise, network health is Healthy.
Server status uses the most severe result from disks, services, and network health:
| Condition | Server Status |
|---|---|
| Any disk, service, or network health is Critical | Critical |
| Any disk, service, or network health is Warning (no Critical) | Warning |
| All disks, services, and network health are Healthy | Healthy |
| Server cannot be reached | Unreachable |
- Windows PowerShell 5.1 or PowerShell 7+
- Windows Server or Windows client with CIM/WMI access
- Network connectivity and permissions for remote WMI/CIM (remote servers)
- Write permissions to the output directory (default:
.\reports)
-
Clone or download this repository.
-
Edit
servers.txtwith your target server names. -
Open PowerShell and navigate to the project folder:
cd PowerShell-Server-Inventory-Report
-
Run the script:
.\ServerInventoryReport.ps1
-
Optional parameters:
.\ServerInventoryReport.ps1 -OutputPath 'C:\Reports' .\ServerInventoryReport.ps1 -ServerListFile '.\my-servers.txt' .\ServerInventoryReport.ps1 -SoftwareFilter 'VMware' .\ServerInventoryReport.ps1 -NetworkFilter 'Wi-Fi'
Use -SoftwareFilter to limit exported software in CSV, HTML, and JSON:
.\ServerInventoryReport.ps1 -SoftwareFilter "Google"
.\ServerInventoryReport.ps1 -SoftwareFilter "VMware"Inventory collection still runs for all software; the filter applies to export output only.
Use -NetworkFilter to limit exported network adapters in CSV, HTML, and JSON:
.\ServerInventoryReport.ps1 -NetworkFilter "Wi-Fi"
.\ServerInventoryReport.ps1 -NetworkFilter "Ethernet"Inventory collection still runs for all adapters; the filter applies to export output only.
-
Open the generated files:
reports\InventoryReport.csvreports\InventoryReport.htmlreports\InventoryReport.json
===============================
Server Inventory Report
===============================
Server Summary
--------------
TotalServers : 3
HealthyServers : 1
WarningServers : 1
CriticalServers : 1
FailedServers : 0
TotalDrives : 4
HealthyDrives : 2
WarningDrives : 1
CriticalDrives : 1
TotalServices : 11
HealthyServices : 9
WarningServices : 2
CriticalServices : 1
TotalAdapters : 4
ConnectedAdapters: 2
DhcpEnabledAdapters: 1
StaticIpAdapters : 1
Service Summary
---------------
Healthy Services : 9
Warning Services : 2
Critical Services : 1
Critical Services Detected
----------------------------
ComputerName ServiceName Status StartType HealthStatus
DRAGON WinRM Stopped Automatic Critical
Network Summary
---------------
Total Adapters : 4
Connected Adapters : 2
Disconnected Adapters : 2
DHCP Enabled : 1
Static IP : 1
Network Information
ComputerName AdapterName Status IPAddress Gateway DHCP
DRAGON Wi-Fi Up 192.168.1.25 192.168.1.1 True
Server: DRAGON [Critical]
----------------------------------------
...
CSV report saved to: .\reports\InventoryReport.csv
HTML report saved to: .\reports\InventoryReport.html
JSON report saved to: .\reports\InventoryReport.json
| File | Description |
|---|---|
InventoryReport.csv |
All server, disk, service, software, and network records (RecordType: Server / Disk / Service / Software / Network) |
InventoryReport.html |
Multi-server dashboard with server, disk, service, software, and network sections |
InventoryReport.json |
Structured JSON for InfraOps Dashboard and automation integration |
{
"reportVersion": "v1.6",
"generatedAt": "2026-06-07T19:30:00",
"generatedBy": "ServerInventoryReport.ps1",
"serverSummary": {
"totalServers": 1,
"healthyServers": 0,
"warningServers": 0,
"criticalServers": 1,
"failedServers": 0,
"totalDrives": 2,
"healthyDrives": 0,
"warningDrives": 1,
"criticalDrives": 1,
"totalServices": 11,
"healthyServices": 9,
"warningServices": 2,
"criticalServices": 1,
"totalSoftwarePackages": 124
},
"networkSummary": {
"totalAdapters": 4,
"connectedAdapters": 2,
"disconnectedAdapters": 2,
"dhcpEnabledAdapters": 1,
"staticIpAdapters": 1
},
"servers": [
{
"computerName": "DRAGON",
"operatingSystem": "Microsoft Windows 11 Pro",
"osVersion": "10.0.26200",
"serverStatus": "Critical"
}
],
"disks": [
{
"computerName": "DRAGON",
"driveLetter": "C",
"totalSizeGB": 117.91,
"freeSpaceGB": 9.47,
"freePercent": 8,
"status": "Critical"
}
],
"services": [
{
"computerName": "DRAGON",
"serviceName": "WinRM",
"displayName": "Windows Remote Management",
"status": "Stopped",
"startType": "Automatic",
"healthStatus": "Critical"
}
],
"software": [
{
"computerName": "DRAGON",
"displayName": "Google Chrome",
"displayVersion": "137.0.7151.120",
"publisher": "Google LLC",
"installDate": "2026-05-10",
"estimatedSizeMB": 412
}
],
"networks": [
{
"computerName": "DRAGON",
"adapterName": "Wi-Fi",
"status": "Up",
"ipAddress": "192.168.1.25",
"defaultGateway": "192.168.1.1",
"dhcpEnabled": true
}
],
"failedServers": []
}Add screenshots of the HTML report to the screenshots folder for documentation and portfolio use.
- PowerShell
- WMI / CIM (
Get-CimInstance) - Storage cmdlets (
Get-Volumefor local disks) - Network cmdlets (
Get-NetAdapter,Get-NetIPConfiguration,Get-NetIPInterface) - Service cmdlets (
Get-Service,Win32_Servicevia CIM) - Windows Registry (
Get-ItemProperty,StdRegProvvia CIM for remote) Export-Csv,ConvertTo-Json, and custom HTML generation
| Version | Description |
|---|---|
| v1.0 | Initial release — basic inventory collection, CSV and HTML export |
| v1.1 | Disk health dashboard — health status, color-coded HTML, summary section |
| v1.2 | Multi-server inventory — remote collection, server health evaluation, unreachable handling |
| v1.3 | JSON export — InfraOps Dashboard integration, machine-readable collector output |
| v1.4 | Windows services inventory — service health monitoring, critical service detection, service exports |
| v1.5 | Installed software inventory — software asset reporting, publisher summary, software filtering |
| v1.6 | Network inventory — adapter configuration, network health monitoring, DHCP/DNS/gateway reporting, network exports |
- InfraOps Dashboard web application integration
- Credential parameter for remote authentication
- Scheduled task deployment guide
- Installed software and Windows Update status
- Email report delivery option
- Azure VM inventory integration
Provided for learning and portfolio use. Fork, extend, and adapt for your environment.
