# The Scripts Every Project Has

A build.ps1 gathers a project's chores in one script, each task a function that -Task picks through a ValidateSet parameter and a switch; Get-Command checks that the tools the project needs are installed, and $ErrorActionPreference = 'Stop' with throw stops the script at the first problem.

![Cheat sheet for the lesson The Scripts Every Project Has: A build.ps1 gathers a project's chores in one script, each task a function that -Task picks through a ValidateSet parameter and a switch; Get-Command checks that the tools the project needs are installed, and $ErrorActionPreference = 'Stop'…](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/a4a874b473584043a5b97687e58b23a9.webp)

- Category: PowerShell
- Level: Journeyman
- Tags: build-script, erroractionpreference, get-command, powershell, throw, validateset
- Updated: November 10, 2026

Source: https://www.ask-codey.com/cheat-sheets/powershell-project-scripts-cheat-sheet
