Scripts and a PowerShell module for gathering system and network statistics on Windows hosts. Metrics are written to CSV files for easy analysis.
- Monitor CPU, memory and disk performance counters
- Track disk usage for each mounted drive
- Capture recent system, application and security event log entries
- Record network interface traffic statistics
- Optional SMTP alerting via
Send-Alert
- Scripts support optional iteration limits for controlled execution
- Pester unit tests and GitHub Actions workflow
- PowerShell 5.1 or higher
- Windows operating system
- Scripts must run with administrator privileges to access performance counters, event logs and task scheduling features
The monitoring commands are packaged as a module named MonitoringTools. Import it directly from the repository or install it locally:
# From the repository directory
Import-Module .\MonitoringTools.psd1
# Or install from a local repository
Register-PSRepository -Name LocalRepo -SourceLocation (Get-Item .).FullName -InstallationPolicy Trusted
Install-Module -Name MonitoringTools -Repository LocalRepo -Scope CurrentUser -Force
Basic usage examples are provided in docs/usage.md.
Instructions for scheduling the scripts with Windows Task Scheduler are in docs/scheduled_tasks.md.
Maintainers can publish new versions using publish_module.ps1
as documented in
docs/publishing.md.
Pester tests run automatically via GitHub Actions. Execute them locally with:
Invoke-Pester -Path .\tests
If module installation fails due to network restrictions, clone the
Pester repository and import Pester.psd1
from the src
folder before running the tests.
Modify counters or threshold parameters in MonitoringTools.psm1
to suit your
environment. The module emits warnings rather than errors when a particular
metric cannot be collected.
This project is licensed under the MIT License. See LICENSE for details.