Here's one of mine, a quick check for whether hosts are reachable on HTTPS:
It's simple, but I use variations of it constantly. What's a small PowerShell, Bash, or Python script you couldn't live without
Code:
import socket
hosts = ["snmlabs.net", "1.1.1.1"]
for h in hosts:
try:
socket.create_connection((h, 443), timeout=3).close()
print(f"{h}: up")
except OSError:
print(f"{h}: down")
It's simple, but I use variations of it constantly. What's a small PowerShell, Bash, or Python script you couldn't live without