# In a Project

In a Project: The Scripts Every Project Has, Calling Other Programs, Secrets Out of Scripts.

Updated: November 10, 2026

1. [The Scripts Every Project Has](https://www.ask-codey.com/lessons/powershell-project-scripts) (Journeyman): 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.
2. [Calling Other Programs](https://www.ask-codey.com/lessons/powershell-native-commands) (Journeyman): Programs such as git, dotnet and npm run from PowerShell by name, hand back their output as lines of text, take arguments from variables and arrays, and run by a path with & in front; a failing program doesn't stop a script by itself, so check $LASTEXITCODE after it, or set $PSNativeCommandUseErrorActionPreference to $true.
3. [Secrets Out of Scripts](https://www.ask-codey.com/lessons/powershell-secrets) (Journeyman): A password or token written into a script travels wherever the script goes, so a script names the secret it needs and reads it from an environment variable, asks for it with Get-Credential, or fetches it from a SecretManagement vault, and stops with a clear message when it isn't there.

Source: https://www.ask-codey.com/courses/powershell-in-depth/topics/powershell-in-a-project
