About 17,200 results
Open links in new tab
  1. 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.

  2. 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 …

  3. about_Functions_Advanced_Parameters - PowerShell | Microsoft …

    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 with the parameter.

  4. 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 …

  5. 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.

  6. about_Scopes - PowerShell | Microsoft Learn

    Feb 2, 2025 · Variables and functions that are present when PowerShell starts, such as automatic variables and preference variables, are created in the global scope. The variables, aliases, …

  7. Everything you wanted to know about ShouldProcess - PowerShell

    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 support and it's easy to …

  8. 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 …

  9. 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 …

  10. about_Splatting - PowerShell | Microsoft Learn

    Sep 24, 2025 · This technique is useful when you are creating a proxy function, that is, a function that calls another command. This feature is introduced in Windows PowerShell 3.0.