Powershell ISE - Snippet | Templates
Snippets are script templates. For example a "do-until" or "for" loop or a template for a cmdlet.
By selecting a snippet, the sample code is inserted into the editor. Powershell ISE, see also: how to create a PowerShell script
Calling snippets
Calling snippets is done in the Powershell ISE with Ctrl + J
loads the template into the ISE script area:
Create Snippet yourself
To do this, the script is marked with @' at the beginning and '@ at the end and stored in a variable:
The command "New-ISESnippet" saves the script as a new snippet
Ctrl+J loads our self-created snippet:
({{pro_count}})
Rate Post:{{percentage}} % positive
({{con_count}})