Every "AI prompting" article online is written for marketers. Here are the prompts I actually use day to day managing Windows Server and Linux boxes. Copy, adjust the [brackets], run.
Windows Server / PowerShell
Check disk space and alert if below threshold
Write a PowerShell script that checks free disk space on all local drives on Windows Server 2022. If any drive is below [15]% free, write an alert line to C:\Logs\disk-alert.log with timestamp and drive letter.
Find what process is locking a file
PowerShell one-liner to find which process has a lock on [C:\path\to\file.log] on Windows Server 2022.
Export all local users with last logon
PowerShell script for Windows Server 2022: export all local user accounts (name, enabled status, last logon date, group memberships) to CSV at [C:\Reports\users.csv].
Schedule a script to run at boot
PowerShell command to create a scheduled task on Windows Server 2022 that runs [C:\Scripts\startup.ps1] as SYSTEM at system startup with a 60-second delay.
Linux / Bash
Monitor a service and restart if down
Bash script for Ubuntu 24.04: check if [nginx] is running every 5 minutes via cron. If stopped, restart it and append a line to /var/log/service-monitor.log with timestamp.
Find the largest files eating disk space
One-liner to find the 20 largest files under [/var] on Linux, showing size and full path, sorted largest first.
Block an IP in UFW and log it
Bash one-liner to block [1.2.3.4] in UFW, then append "Blocked 1.2.3.4 - [reason] - $(date)" to /var/log/manual-blocks.log.
Tail logs from multiple services at once
Command to tail the last 50 lines and follow output from both /var/log/nginx/error.log and /var/log/mysql/error.log simultaneously in one terminal.
Debugging / Troubleshooting
Explain a cryptic error
Explain this error from [nginx/Windows Event Log/journalctl] and give me the 3 most likely causes with how to verify each:
[paste error here]
Review a config for mistakes
Review this [nginx/sshd/samba] config for security issues, misconfigurations, and anything that would cause it to fail to start. Point out line numbers.
[paste config here]
Game Servers
Write a systemd unit for a game server
Write a systemd service unit for a [Hytale/Minecraft/Valheim] server on Ubuntu 24.04. Binary at [/opt/gameserver/start.sh], runs as user [gameserver], restarts on failure with 10-second delay, 60 seconds to shut down cleanly.
Backup world before restart
Bash script: before restarting a [Minecraft] server via systemctl, compress [/opt/minecraft/world/] to [/backups/world-YYYYMMDD-HHMMSS.tar.gz], keep only the last [7] backups, then restart.
One thing worth noting
These prompts get you 90% of the way there. The remaining 10% is always your environment — paths, usernames, service names, OS version quirks. Read the output before running it. Dry-run anything destructive with -WhatIf (PowerShell) or echo (bash) first.
I update this list when I find prompts that work consistently. Last updated: April 2026.