# Parameters: \`param()\`

A param() block at the top of a script names its inputs, so one script works on any folder; each parameter can have a type, a default value or be a \[switch\], Mandatory makes PowerShell ask for a missing one, and Tab completes their names.

![Cheat sheet for the lesson Parameters: \`param()\`: A param() block at the top of a script names its inputs, so one script works on any folder; each parameter can have a type, a default value or be a \[switch\], Mandatory makes PowerShell ask for a missing one, and Tab completes their names.](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/6fd4662219bd4ede92844ba0247e7d99.webp)

- Category: PowerShell
- Level: Apprentice
- Tags: mandatory-parameter, param-block, parameter, positional-parameter, powershell, switch-parameter, tab-completion
- Updated: November 10, 2026

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