
Functions - PowerShell | Microsoft Learn
Jan 23, 2025 · Learn how to create reusable PowerShell functions, implement best practices, and avoid common pitfalls in function design, error handling, and parameter validation.
about_Functions - PowerShell | Microsoft Learn
Jul 16, 2025 · If you don't use one of the keywords (begin, process, end, clean) in a function definition, PowerShell puts the statements in the end block. For more information about the …
about_Functions_Advanced_Parameters - PowerShell | Microsoft …
Feb 25, 2025 · You can add parameters to the advanced functions that you write, and use parameter attributes and arguments to limit the parameter values that function users submit …
about_Return - PowerShell | Microsoft Learn
Sep 29, 2025 · When you return a collection from your script block or function, PowerShell automatically unrolls the members and passes them one at a time through the pipeline.
about_Functions_Advanced - PowerShell | Microsoft Learn
Sep 29, 2025 · Advanced functions allow you create cmdlets that are written as a PowerShell function. Advanced functions make it easier to create cmdlets without having to write and …
Everything you wanted to know about ShouldProcess - PowerShell
Sep 24, 2024 · PowerShell functions have several features that greatly improve the way users interact with them. One important feature that is often overlooked is -WhatIf and -Confirm …
about_Function_Provider - PowerShell | Microsoft Learn
Sep 29, 2025 · The PowerShell Function provider lets you get, add, change, clear, and delete the functions and filters in PowerShell. A function is a named block of code that performs an action.
about_Comment_Based_Help - PowerShell | Microsoft Learn
May 21, 2025 · This topic explains how to write help content for functions and scripts. For information about how to display help content for functions and scripts, see Get-Help. The …
Add Credential support to PowerShell functions - PowerShell
Nov 17, 2022 · This article shows you how to add credential parameters to PowerShell functions and why you'd want to. A credential parameter is to allow you to run the function or cmdlet as …
about_Functions_Advanced_Methods - PowerShell | Microsoft Learn
Sep 29, 2025 · Describes how functions that specify the `CmdletBinding` attribute can use the methods and properties that are available to compiled cmdlets.