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:

Networking

Hosts file
BAT
Edit your hosts file easily.
Right-click and run as Administrator so you can save it after
Network devices
BAT
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
PS1
Show your gateway IP address.
Uses an external API to process the result (https://api.my-ip.io)

Certificates (Oh how I love certificates!)

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

DevOps

Test website SSL

PS1
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
PS1
Generates a password with a specified length
Call with:
./MakePassword.ps1 -length 32