Configure.ps1 script refactoring