Rewrite the build scripts using PowerShell