The current setup assumes a Unix-like shell environment, causing script execution to fail on Windows. We need a reliable mechanism to detect when the host OS is Windows and automatically switch to running a Powershell script instead of the default shell script. This should be seamless and not require manual intervention.