A PowerShell script that automatically collects and reports key system metrics — disk usage, CPU load, memory stats, and service status — and saves everything into a neatly formatted .txt report.
powershell-system-monitor/
├── system_analyse_script.ps1 # Main PowerShell script
└── SystemReport.txt # Auto-generated output report
- Disk Usage — Lists all drives with used and free space in GB
- CPU Usage — Fetches processor name, max clock speed, and current load percentage
- Memory Usage — Calculates used vs. free RAM as percentages
- Services Data — Separates and lists all Running and Stopped Windows services
=== System Health Report ===
Generated On: 03/17/2026 20:04:55
--- Disk Usage ---
C Used: 164.85 GB Free: 131.76 GB
D Used: 70.02 GB Free: 79.98 GB
--- CPU Usage ---
AMD Ryzen 7 7435HS | Max Clock: 3100 MHz | Load: 14%
--- Memory Usage ---
Used Memory: 62.14%
Free Memory: 37.86%
--- Services Data ---
Running Services: Audiosrv, Dhcp, WSearch, MySQL80 ...
Stopped Services: WinRM, wuauserv, VSS ...
Prerequisites: Windows with PowerShell 5.1+ or PowerShell 7+
# 1. Clone the repository
git clone https://github.com/your-username/powershell-system-monitor.git
cd powershell-system-monitor
# 2. Allow script execution (if not already set)
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
# 3. Run the script
.\system_analyse_script.ps1The report will be saved as SystemReport.txt in the same directory.
- PowerShell variables and cmdlets
Get-PSDrivefor disk informationGet-WmiObject Win32_Processorfor CPU dataGet-CimInstancefor memory metricsGet-Servicewith filtering for running/stopped services- Writing formatted output to
.txtfiles
This project was built while following the PowerShell tutorials by Automate with Rakesh on YouTube.
Rakesh's tutorials are a fantastic resource for learning PowerShell automation and scripting from scratch — highly recommended!
- The report is timestamped at generation time (
Generated Onfield). - The
Tempdrive entry maps to your user'sAppData\Local\Tempdirectory. - Run as Administrator for complete service data access.
Harshad Raurale
DevOps / Cloud Enthusiast
This project is for learning purposes. Feel free to fork, modify, and build on it!
⭐ If you found this project helpful, please consider giving it a star!