Function

say it: “FUNGK-shun” /ˈfʌŋkʃən/

A named, reusable block of code.

What is Function?

A function is a named, reusable block of PowerShell code.

function Get-Greeting($Name) {
    "Good morning, $Name!"
}

Get-Greeting -Name 'Maria'

Level: Journeyman · More PowerShell terms at this level

Updated

In other subjects