Awesome VSCode Snippets for PowerShell

A curated list of awesome vscode snippets for PowerShell.

Inspired by the awesome lists, focusing on PowerShell snippets in VSCode

What are snippets

Code snippets are templates that make it easier to enter repeating code patterns, such as loops or conditional-statements.
The list of snippets below is not integrated into the extension. However, instead, users can add them to their own, custom snippets file.
Check out the VSCode documentation on snippets. It provides an overview and instructions on how to author snippets. It's really simple - just a little bit of JSON.

Parameter-Credential

Add a -Credential parameter that supports a PSCredential object in a variable, -Credential (Get-Credential), or -Credential Username (will prompt). Includes an empty PSCredential object as the default value but this is the first tabstop so pressing backspace after inserting the snippet removes it. by @omniomi