param Block

say it: “puh-RAM BLOK” /pəˈræm blɒk/

Declares the parameters a script or function accepts.

What does param Block do?

A param() block declares the parameters a script or function accepts, with types, defaults and rules.

param(
    [Parameter(Mandatory)]
    [string]$Destination,
    [int]$KeepDays = 7
)

Level: Journeyman · More PowerShell terms at this level

Updated