Skip to content

Repository files navigation

WinOps Admin Toolkit

A command-line toolkit for reviewing Windows system health from structured JSON records. Analyzes service status, event log data, and disk usage — and generates a combined prioritized findings report.

All analysis runs locally against sample or exported JSON input files. No Windows host connection required.

What it does

Command What it analyzes
services Flags services that are stopped when set to start automatically, and services in a degraded state
events Counts events by severity level, surfaces top errors and critical events by occurrence count
disks Flags volumes above configurable warning and critical usage thresholds
report Aggregates findings from all three sources into a single prioritized output

Features

  • Reviews Windows service-health records from structured JSON.
  • Summarizes event-log severity counts and top recurring errors.
  • Flags disk volumes above configurable warning and critical thresholds.
  • Combines services, events, and disks into one prioritized report.
  • Supports text and JSON output for scripts and automation.
  • Runs locally against exported sample data without requiring live Windows host access.

Setup

git clone https://github.com/LazyPanda902/winops-admin-toolkit.git
cd winops-admin-toolkit
python3 -m venv .venv && source .venv/bin/activate
pip install -e .

Usage

Service health

winops services samples/services.json
winops --json services samples/services.json

Event log

winops events samples/events.json
winops events samples/events.json --top-n 10

Disk usage

winops disks samples/disks.json
winops disks samples/disks.json --warning 75 --critical 88

Combined report

winops report \
  --services samples/services.json \
  --events   samples/events.json \
  --disks    samples/disks.json

# JSON output
winops --json report \
  --services samples/services.json \
  --events   samples/events.json \
  --disks    samples/disks.json

# Write report to file
winops report --services samples/services.json --output-file report.txt

The CLI exits with code 1 when any high-severity findings are present, making it usable in shell pipelines.

Custom config

winops --config config/default.json report --services samples/services.json

See docs/config-example.md for all options and input formats.

Testing

pip install -r requirements.txt
pytest tests/ -v --cov=src --cov-fail-under=80

The test suite covers all analysis modules, the report builder, and the CLI.

Project structure

src/
  cli.py              CLI entry point — subcommands, flags, config loading
  service_health.py   Load and analyze service status records
  event_log.py        Load and summarize event log records
  disk_usage.py       Load and analyze disk usage records
  report.py           Build and format a combined findings report
tests/                pytest test suite (one file per module)
samples/              Sample JSON input files (fake data only)
config/               Default JSON config
docs/                 Config reference, usage examples, testing guide, roadmap

Input format overview

services.json

[
  {"name": "Spooler", "state": "Stopped", "start_type": "Automatic", "pid": null, "host": "DEMO-PC-01"}
]

events.json

[
  {"event_id": 7034, "level": "Error", "source": "Service Control Manager",
   "message": "Print Spooler stopped.", "timestamp": "2024-01-15T09:23:11Z",
   "host": "DEMO-PC-01", "count": 3}
]

disks.json

[
  {"drive": "C:", "label": "OS", "total_gb": 238.5, "used_gb": 198.2, "free_gb": 40.3, "host": "DEMO-PC-01"}
]

More examples

See docs/usage-examples.md for full command examples and sample output.

Roadmap

See docs/roadmap.md.

Security

This repository contains only sample data with fake hostnames, service names, and disk labels. Do not commit real event logs, credentials, hostnames, or customer data. See SECURITY.md.

License

MIT

About

Python toolkit for Windows admin checks, support workflows, and Active Directory operations notes.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages