Revised approach. Scripts were rewritten in powershell
removed old script