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

    Mar 27, 2025 · You can open and edit Windows PowerShell files in the Script Pane. Specific file types of interest in Windows PowerShell are script files ( .ps1 ), script data files ( .psd1 ), and …

  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 …

  3. about_Scripts - PowerShell | Microsoft Learn

    Jan 19, 2024 · How to write a script. A script can contain any valid PowerShell commands, including single commands, commands that use the pipeline, functions, and control structures …

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

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

  6. Getting started with PowerShell - PowerShell | Microsoft Learn

    Aug 2, 2024 · A PowerShell script is a plaintext file that contains the commands you want to run. PowerShell script files use the .ps1 file extension. To create a PowerShell script, use a code …

  7. Functions - PowerShell | Microsoft Learn

    Jan 23, 2025 · In this chapter, you learned the basics of writing functions in PowerShell, including how to: Create advanced functions; Use parameter validation; Use verbose output; Support …

  8. Write-Host (Microsoft.PowerShell.Utility) - PowerShell

    The Write-Host cmdlet's primary purpose is to produce for-(host)-display-only output, such as printing colored text like when prompting the user for input in conjunction with Read-Host. …

  9. PowerShell@2 - PowerShell v2 task | Microsoft Learn

    steps: - powershell: # Run a script in Windows PowerShell on Windows, and pwsh on Linux and macOS. - pwsh: # Run a script in PowerShell Core on Windows, macOS, and Linux. Set a …

  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 …

Refresh