
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
Apr 17, 2025 · Use this technique in functions that call commands in the session. You don't need to declare or enumerate the command parameters, or change the function when command …
Script modules - PowerShell | Microsoft Learn
Mar 27, 2025 · In PowerShell, a script module is simply a .psm1 file that contains one or more functions, just like a regular script, but with a different file extension. How do you create a …
about_Functions_Advanced - PowerShell | Microsoft Learn
Jan 3, 2025 · Advanced functions make it easier to create cmdlets without having to write and compile a binary cmdlet. Binary cmdlets are .NET classes that are written in a .NET language …
PowerShell developer reference for Azure Functions
Jan 22, 2025 · A PowerShell Azure function (function) is represented as a PowerShell script that executes when triggered. Each function script has a related function.json file that defines how …
Running commands in the shell - PowerShell | Microsoft Learn
Cmdlets can be written in any compiled .NET language or using the PowerShell scripting language itself. PowerShell commands that run other commands. The PowerShell call …
Add Credential support to PowerShell functions - PowerShell
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 a different user. …
about_Return - PowerShell | Microsoft Learn
Jan 19, 2024 · Both the informational string and the result of the calculation are returned by the function and assigned to the $a variable. If you would like to display a message within your …
about_Functions_Advanced_Methods - PowerShell | Microsoft Learn
Oct 16, 2024 · Calling the function at the beginning, or outside of a pipeline, executes the process block once. Within a pipeline, the process block executes once for each input object that …
about_Function_Provider - PowerShell | Microsoft Learn
Mar 6, 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 …