About 1,680,000 results
Open links in new tab
  1. How to Write and Run Scripts in the Windows PowerShell ISE

    Mar 27, 2025 · This article describes how to create, edit, run, and save scripts in the Script Pane.

  2. Introduction to scripting in PowerShell - Training | Microsoft Learn

    Understand how to write and run scripts. Use variables and parameters to make your scripts flexible. Apply flow-control logic to make intelligent decisions. Add robustness to your scripts by adding error management.

  3. about_Scripts - PowerShell | Microsoft Learn

    Jan 19, 2024 · 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 the services that are running on the current system and saves them to a log file.

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

  5. How to Write a PowerShell Script Module - PowerShell

    Jun 9, 2022 · 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.

  6. Getting started with PowerShell - PowerShell | Microsoft Learn

    Aug 2, 2024 · PowerShell script files use the .ps1 file extension. To create a PowerShell script, use a code editor like Visual Studio Code (VS Code) or any text editor such as Notepad.

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

  8. PowerShell scripts to customize pipelines - Azure Pipelines

    Jul 4, 2024 · This article explains how you can move beyond compiling and testing code and use PowerShell scripts to add business logic to pipelines. The Azure Pipelines PowerShell task runs PowerShell scripts in your pipelines.

  9. Using Visual Studio Code for PowerShell Development

    Apr 28, 2023 · Visual Studio Code with the PowerShell extension is the recommended editor for writing PowerShell scripts. It supports the following PowerShell versions: PowerShell 7.2 and higher (Windows, macOS, and Linux) Windows PowerShell 5.1 …

  10. Write-Output (Microsoft.PowerShell.Utility) - PowerShell

    Write-Output sends objects to the primary pipeline, also known as the success stream. To send error objects to the error stream, use Write-Error. This cmdlet is typically used in scripts to display strings and other objects on the console. One of the built-in aliases for Write-Output is echo and similar to other shells that use echo.

Refresh