Powershell: Making a RESTful API endpoint in powershell (kinda like python flask)

Summary:
While running scripts interactively and even on a scheduled basis is fine, I wanted to explore the possibility of making my scripts event-driven.  Take the vCheck Health Script for example.  Running that on a schedule is fine, but what if I wanted to run that on-demand?  Or other scripts in general?

The cool thing, you can do it all in Powershell Core!  Meaning, docker, linux, macOS, etc.  Basically, you can have this script run on OS startup (pre-populated with your endpoint configs/scripts) and you would have a Powershell driven REST-style API endpoint to run your scripts.

Here is the example, feel free to try it.  It'll do nothing of consequence on it's own.  I'll post later with a video on how to use it.


Powershell Core: DNSClient cmdlets .NET Alternative

Summary:
DNS Cmdlets are not available in Powershell Core, but fear not, you can make use of .NET to get effectively the same functions, for DNS resolution anyway.

My old post here details how to use .NET method:

Useful Powershell .NET method to convert DNS name to IP