Windows – Utility scripts

I do love a good batch file! Or a nice PowerShell script… Lost count of the number written over the years. They can be VERY useful and save a bunch of time.

Here is a collection of scripts for your arsenal of scripting:


Hosts file
Edit your hosts file easily.
Right-click and run as Administrator so you can save it after
Network devices
List network devices and optinally show details. Run:
ListNetwork.bat [args, see below]
list = List all network devices
status = List network devices and show connected status
config = List network device config values
Whats my IP
Show your gateway IP address.
Uses an external API to process the result (

Certificates (Oh how I love certificates!)

Current User
Open certificates for the current user
Local Machine
Open certificates for the local machine


Test website SSL

Script to test the SSL on a given website. Shows the start/end time for the certificate and the number of days before expiry.
Call with:
./TestDomainCert.ps1 -url “https://…..”
Generate password
Generates a password with a specified length
Call with:
./MakePassword.ps1 -length 32