February 2019
Intermediate to advanced
626 pages
15h 51m
English
Scripts, functions, and filters have equivalent functionality: all are considered to be commands. The most significant difference is how the command is stored and presented. A script is saved in a file with a ps1 extension. Functions and filters can be created directly in the console, dot-sourced from a ps1 file, or imported from a module.
The difference between a function and a filter is small and will be described when we explore Begin, Process, and End in this chapter. Filters are otherwise exactly like functions. Using filters is not recommended; they are extremely rare and may confuse others attempting to maintain a piece of code.
Read now
Unlock full access