Sharing and Exchanging ISE Code Snippets

by May 6, 2013

By default, the PowerShell 3.0 ISE editor loads code snippets automatically, and you can then select and insert any of these by pressing CTRL+J.

Custom code snippets are stored in a special folder that you can open like this:

$snippetPath = Join-Path (Split-Path $profile.CurrentUserCurrentHost) "Snippets"
explorer $snippetPath

As you see, custom snippets are stored in a folder, and each is a file with the extension ps1xml. By opening this folder in your File Explorer, it is very easy to delete unwanted snippets or share some of them with friends and colleagues.

Twitter This Tip! ReTweet this Tip!