# Calling Other Programs

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.

![Cheat sheet for the lesson Calling Other Programs: 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…](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/83946a6a3dd441269be30e3b88bbb865.webp)

- Category: PowerShell
- Level: Journeyman
- Tags: call-operator, exit-code, native-command, powershell, psnativecommanduseerroractionpreference, splatting
- Updated: November 10, 2026

Source: https://www.ask-codey.com/cheat-sheets/powershell-native-commands-cheat-sheet
