
How to Write and Run Scripts in the Windows PowerShell ISE
Nov 20, 2025 · This article describes how to create, edit, run, and save scripts in the Script Pane.
Introduction to scripting in PowerShell - Training | Microsoft Learn
This module introduces you to scripting with PowerShell. It introduces various concepts to help you create script files and make them as robust as possible.
about_Scripts - PowerShell | Microsoft Learn
To write a script, open a new file in a text editor, type the commands, and save them in a file with a valid filename with the .ps1 file extension. The following example is a simple script that gets …
Write your first PowerShell code - Training | Microsoft Learn
In this module, you begin learning the basics of programming by writing and running code in PowerShell.
How to Write a PowerShell Script Module - PowerShell
A script module is any valid PowerShell script saved in a .psm1 extension. This extension allows the PowerShell engine to use rules and module cmdlets on your file. Most of these capabilities …
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.
Write-Output (Microsoft.PowerShell.Utility) - PowerShell
By default, Write-Output enumerates objects in a collection. However, Write-Output can also pass collections down the pipeline as a single object with the NoEnumerate parameter.
Using Visual Studio Code for PowerShell Development
Dec 8, 2025 · Together with the PowerShell extension, it provides a rich and interactive script editing experience, making it easier to write reliable PowerShell scripts. Visual Studio Code …
PowerShell scripts for pipelines - Azure Pipelines | Microsoft Learn
Oct 27, 2025 · To use a PowerShell script, you add the PowerShell v2 (PowerShell@2) task to your pipeline, and then enter an inline PowerShell script or call a PowerShell script file.
PowerShell@2 - PowerShell v2 task | Microsoft Learn
Dec 18, 2025 · By default, PowerShell v2 uses PowerShell Core for Linux agents and Windows PowerShell for Windows agents. To use the latest version of PowerShell on Windows agents, …