Powershell Snippet Manager

promoheader2_small

SnippetManager 2 is a code snippet manager for ISE and PowerGUI. Its based on an award winning add-on and enables you to comfortably manage PowerShell code snippets. Its free and completely written in PowerShell. And now with full ISE support!

Screenshot Main v.2.0.0

Snippets?

If you never worked with snippets before, here is a short explanation: Snippets are code fragments or short scripts that you save for later, so that you can use them again in another script. You’ve probably done that before by opening an old script and copy parts out of out. By saving such parts as a “snippet” you can do this much easier. And this is just the start.

Once you assigned a name to your snippet, you can easily paste them in a script, using the “snippets”-menu entry in the context menu of ISE V3 or PowerGUI Script Editor.
In addition to that, you can replace parts of the snippet code (e.g. function names, variables or anything that you probably would change when you use that code again) with a placeholder (currently only supported by PowerGUI). This placeholder will be highlighted when you paste the snippet to your script, and you can simply put in a new value for the placeholder.

Features

Snippet Explorer – copy, paste, rename, delete snippets and snippet categories
Snippet Creator
– change existing snippets, create new snippets, advanced placeholder functions (auto-creation of placeholders, delete existing placeholders with auto-replacement to the default value, auto highlighting of placeholders etc.)
Store Room
– quick and easy deactivation (and reactivation) of snippets to clean up your snippets menu
Snippet Converter –
quick and easy conversion between PowerGUI snippet format and ISE snippet format (both directions, as many as you want, with just a click)
Snippet Locations
– support for multiple snippet locations from your network or local computer in snippet explorer. (support of manual UNC paths)
Fulltext Search
– fulltext indexing of all snippets, instant search in the snippet Code, Description, Name and Author.
and much more…

Screenshots:

Screenshot Main v.2.0.0 Screenshot Store Room v.2.0 Screenshot Search Tree v.2.0

Download

A) You can download Snippet Manager here: Installer

B) If you run into any trouble during the installation, you can download the files in a ZIP-file instead: ZIP

  • Just extract the Folder inside anywhere you like.
  • But be sure to use the SnippetManager-Start.cmd to run SnippetManager or to create shortcuts from!

There is a comprehensive help file included, but you can also download it separately: PDF

Requirements

Powershell v3 is recommend for this version (2.0.0) of SnippetManager
Powershell v2 is sufficent, although enhanced syntax coloring does not work properly and is therefore deactivated.

If you work with PowerGUI, v.2.3 is required and ISE supports snippets with the v3 (which comes with Powershell v3)

Video Tutorial

This is an in-depth video tutorial for beginners. Its about version 0.9 (!) when SnippetManager was “just” a PowerGUI addon.

I usually wouldn’t recommend it because it misses a lot of new features, but i also know, lots of people like videos more than reading the help. So be aware: it does not mention ISE and a few other features, but it covers the basic functions. But you may also want to read the help file to find out about all the improvements and new features in the latest version.

You can watch the tutorial here:

or in better quality and with selectable chapters here: (min. screen res 1280×768)

Version History

v2.0.0
——-
A) Improvements/Features:

  • ISE support! SnippetManager now fully supports the ISE snippets format.
  • ISE <-> PowerGUI Snippet Converter! – You can easily convert all (or just a few of) your snippets from PowerGUI to ISE (and back) with just a click.
  • Quicksearch! With the new quicksearch-box you can now even faster find the snippets you are looking for. Just open SnippetManager and start typing a name, keyword, command… etc.
  • Full Syntax Coloring! SnippetManager now provides full syntax coloring, even while typing. (Powershell V3 required)
    - Included are currently two coloring shemes (easily changable via the options menu):
    An ISE color sheme, which looks exactly like the colors in ISE and a (more moderatly colored :))
    SnippetManager color sheme.
  • SnippetExplorer drag and drop capability (yeah i know, but now its there :) )
  • Faster Snippet Processing (up to 10x faster for large snippets)
  • New Design
  • More commands/menue items support keyboard shortcuts (the available shortcuts are shown in the tooltip of the item)
  • Standalone Tool: SnippetManager is now a standalone tool, not a PowerGUI addon anymore. That means (for now) only that it gets started by a shortcut on your desktop. I will however add “launcher”-addons for ISE and PowerGUI later this year, so that you can start SnippetManager from inside your editor

B) Bugfixes:

  • lots of minor bugfixes

v1.1.0
———-
Improvements/Features:

  • Faster Snippet Processing
  • Improved Syntax Highlighting

Bugfixes:

  • various Bugfixes

v1.0.2
Bugfixes:

  • various Bugfixes

v1.0.1
Improvements/Features: (in detail see here)

  • Snippet Locations! You can now add multiple snippet folders from your network or local computer to the snippet explorer. (You can also manually add UNC Paths.)
  • Fulltext Search! Snippet Manager creates a fulltext-index of your snippets, so you can very quickly search in the snippet Code, Description, Name and Author.
  • Deactivation and Reactivation of Snippets! Easily deactivate (and reactivate) snippets to clean up your PowerGUI snippets menu.
  • No UAC-Popup Anymore
  • Enhanced Syntax Highlighting
  • Faster Snippet Processing (up to 8x faster)
  • New Option: restore last size and position of the Snippet Manager window at start
  • New Icons

Bugfixes:

  • Fixed: After file operations all Subfolders of the snippets path would be expanded
  • Fixed: Paths with read-only access caused errors
  • Fixed: The ShowInWindowsExplorer Function couldn’t find a snippet or folder if there was a special character in the name
  • minor bugfixes

v0.9.2
Improvements/Features: (in detail see here)

  • SnippetManager now has an installer
  • Most of the commands/menue items now support keyboard shortcuts (the available shortcuts are shown in the tooltip of the item)
  • Automatic update check implemented (optional; can be turned on/off at first start and in the options menu)
  • Future Updates can now be downloaded and installed from inside SnippetManager
  • A standard value for the “Author”-field can be set (in the options menu), which will then be used for all new snippets
  • Link to the Video Tutorial and a “Contact Developer” (mailto) entry added to the Help-Menu

Bugfixes:

  • Fixed: placeholders with equal names could be created
  • Fixed: under certain circumstances a folder could be copied into a subfolder of itself
  • Fixed: snippet path of PowerGui_Pro could not be found

v0.9.1
Improvements/Features:

  • No more limitations for auto-created placeholders, anything (but spaces) can be turned into a placeholder
  • Placeholder names can be changed subsequently, changes will be replicated to all instances in the snippet
  • Improved status-bar

Bugfixes:

  • Fixed auto-word selection caused problems while selecting text in the codebox
  • minor bugfixes

v0.9.0

  • Initial Release


  1. #1 by Ben@SecurityExperts on Thursday - 16:02

    Great job, this is really a very useful tool! Thanks!

  2. #2 by Rashid12 on Wednesday - 00:37

    Thanks for the update. I use this every day, keep it up!

  3. #3 by Liam on Thursday - 17:58

    I’m looking forward to using the snippet manager, but can’t seem to get it working! I’ve tried downloading it from your site and through PowerGUI, but whenever I click “Snippet Manager”, nothing happens. Have you run into this before?

  4. #4 by Liam on Thursday - 18:17

    Update: Execution policy was set to AllSigned. Unrestricted fixed it. Cheers!

  5. #5 by Morgenstern72 on Tuesday - 13:21

    Sadly it does not work with offline files (redirected folders) on Windows 7.
    I get this error:

    “Could not access network location
    \\dfs\home\username\offline\\WindowsPowerShell\Moudles.”
    Note the \\ between offline and WindowsPowerShell

    Could you take a look into that issue? Thx :)

    • #6 by Denniver on Tuesday - 15:07

      Sure, as soon as i get back from my vacation. Please send a me a quick note to snipman@gmx.net so that i can get back to you with follow ups.

      Thanks, Denniver

  6. #7 by Michael on Wednesday - 03:31

    Why is this not shipped with Powershell?
    Great tool!

  7. #8 by Joan on Monday - 08:45

    Great Job!

  1. SnippetManager 2 released | BYTECOOKIE

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: