Emergency server help: get in touch

Automation

Automation scripts and guides: Bash and PowerShell scripts, cron jobs, systemd timers, APIs and tools that take repetitive work off admins.

68 guides, scripts and tools for Automation. Search them or pick a type. Press / to search.

68 pages

DirectAdmin domain_tls_cert_save_post: Run a Script After Every SSL Renewal

Use the DirectAdmin 1.712 domain_tls_cert_save_post.sh hook to run a script after every certificate issue or renewal - with the exact environment variables it passes and an illustrative HAProxy example.

October 26, 2026

MariaDB Watchdog Script: Restart MariaDB or MySQL Only When It Is Really Hung

A Bash watchdog for MariaDB and MySQL: checks that the server answers SELECT 1 within a time limit, saves diagnostics, and restarts only when you allow it and only when it is safe: not during startup or crash recovery, not during a backup, at most twice an hour. Report-only by default.

October 18, 2026

Call Recording Retention Cleaner: Delete or Archive Old FreePBX Recordings

A Bash script that enforces a retention period on Asterisk and FreePBX call recordings. It is a dry run by default, can archive old recordings into a verified tar.gz before deleting them, skips calls still being recorded, can stop the FreePBX call log linking to removed files, and can run only when the disk is filling up.

October 16, 2026

Automate SSL Certificate Renewal for 45-Day Certificates: certbot, cPanel and DirectAdmin

Set up SSL certificate renewal that survives 45-day certificates: certbot with ARI and a deploy hook, cPanel AutoSSL, DirectAdmin's lifetime-based renewal, and an expiry check from outside.

October 9, 2026

Conditional Access Baseline Policies for Microsoft 365 (2027)

A 2026 Conditional Access baseline for Microsoft 365: seven policies, break-glass exclusions, report-only rollout, licensing, and Graph PowerShell export and import.

October 7, 2026

Asterisk AMI Originate a Call with Python

Create a least-privilege Asterisk AMI user, send Login, Originate and Logoff, and place a call with a standard-library Python script. Tested on Asterisk 22.

October 7, 2026

PowerShell Cheat Sheet for Windows Server Admins

PowerShell cheat sheet for Windows Server admins: services, Get-WinEvent filters, networking, firewall, disks, updates, local users, Active Directory, remoting and tasks.

October 6, 2026

AD Health Check Report: dcdiag and repadmin PowerShell Script

Free PowerShell script that runs dcdiag, repadmin /replsummary, w32tm and SYSVOL DFSR checks on every DC and saves a colour-coded HTML report.

October 6, 2026

AD Nested Group Membership: PowerShell Tree with Loop Detection

Free PowerShell script that shows the full nested group membership tree of an AD user or group, with paths, primary group and loop detection.

October 6, 2026

Export AD Users to CSV: PowerShell Script with Last Logon

Free PowerShell script that exports Active Directory users to CSV or HTML with last logon, password age, manager, department and OU.

October 6, 2026

NTFS Permissions Report to CSV: PowerShell Folder ACL Script

Free PowerShell script that exports NTFS folder permissions to CSV: identity, rights, allow/deny, inherited or explicit, scope, with errors logged.

October 6, 2026

Block RDP Brute Force on Windows Server: PowerShell Script

Free PowerShell script that reads failed RDP logons (event 4625), counts them per source IP and blocks repeat offenders with Windows Firewall rules, with allow-list and -WhatIf.

October 6, 2026

Free website test

Is your website set up right?

Check SSL, security headers, redirects, robots.txt, sitemap, llms.txt and security.txt in one test. It takes about 30 seconds.