# Functions

Functions: Functions: Naming a Job, Advanced Functions: \`\[CmdletBinding()\]\`, Checking Input: Validation Attributes, Taking Pipeline Input.

Updated: November 10, 2026

1. [Functions: Naming a Job](https://www.ask-codey.com/lessons/powershell-functions) (Journeyman): A function you share gets a cmdlet's kind of name, an approved verb from Get-Verb and a singular noun, takes its inputs in param() and outputs objects rather than sentences, so its results can be sorted, filtered and saved; a file of functions is loaded into your session with a dot.
2. [Advanced Functions: \`\[CmdletBinding()\]\`](https://www.ask-codey.com/lessons/powershell-advanced-functions) (Journeyman): One line, \[CmdletBinding()\] above param(), turns a function into an advanced function that binds its parameters the way a cmdlet does: it refuses a misspelled parameter instead of quietly ignoring it, and gets -Verbose, -ErrorAction and the other common parameters for free.
3. [Checking Input: Validation Attributes](https://www.ask-codey.com/lessons/powershell-parameter-validation) (Journeyman): Validation attributes check a parameter's value before any line of the function runs: \[ValidateSet()\] allows only a list of choices and makes Tab fill them in, \[ValidateRange()\] keeps a number between two limits, \[ValidateNotNullOrEmpty()\] turns away an empty value, and Mandatory asks for one that's missing.
4. [Taking Pipeline Input](https://www.ask-codey.com/lessons/powershell-pipeline-input) (Freelancer): A parameter marked \[Parameter(ValueFromPipeline)\] receives each object that comes down the pipeline, a process block runs once for each of them, and begin and end run once before the first and after the last, for the setup and the totals.

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