Removing ISE Snippets

by May 2, 2013

In a previous tip, we showed how you can use New-IseSnippet to add new code snippets to the ISE editor in PowerShell 3.0. These custom snippets stay permanently because PowerShell creates XML files for them. You can view these files with Get-IseSnippet:

Get-IseSnippet

To remove a snippet that you no longer need, use Get-IseSnippet, identify the one you want to get rid of, and delete it. This sample would look for a snippet with a name that starts with "function body", and deletes it:

Get-IseSnippet | 
  Where-Object Name -like 'Function body*' |
  Remove-Item

The snippet will stay in memory until you close the ISE editor.

Twitter This Tip! ReTweet this Tip!