Refactoring of the solution

Refactored the powershell file. It will now work with no environment or domain, an environment (and use the default value) and an environment and a domain.

Separation of the foreach into small functions that allow testability. 

Addition of a synopsis for each of use. This now means you can write something like:

get-help -full .\TransformConfig.ps1

Next up for me is to investigate making this a module for enhanced use!