On average I'm working with Docker for Windows on my machine when I need to analyze some data or say build reports from collected metric data of a given client. The environment.ps1
script provided simply does some validates for me and ensures everything is in order.
I'm not using Pester for the testing of the environment because on average I don't have machines in client environments with that installed. Just making it more universal for right now but if you want to take it and go with using Pester...by all means.
Without having to install other tools or PowerShell modules I'm just doing a string match for version 18 of the docker engine that comes with Docker for Windows.
The remainder of this script checks that dbatools is installed. I also hard code the version I'm coding against because to many changes can occur with the module and I'd prefer my scripts are stable. I leave the option up to the user if they want to continue using a higher or lower version of the module. I code against a given version of dbatools and only support that version in a given script/project until I've tested it on a higher version.