Skip to main content

Custom Snippets

Custom Snippets lets you save reusable PowerShell code, such as file-copy commands or registry cleanup logic, and insert it again in future projects.

Custom Snippets — create and manage reusable PowerShell snippets

Create a snippet

  1. Select Create a snippet.
  2. Enter a snippet Name.
  3. Enter the Prefix used to invoke the snippet.
  4. Add a Description shown in IntelliSense.
  5. Enter the PowerShell script.
  6. Select Save.
note

Snippets use TextMate Snippet syntax for placeholders and tab stops.

Use a snippet

  1. Start typing the snippet prefix in the Script Editor.
  2. When the snippet appears in the suggestion list, press Tab to insert it.