All posts tagged: PowerShell ISE addons

PasteBin.com WPF addon for PowerShell ISE

In my last post, I showed you a teaser of an upcoming post. So, this post is about the PowerShell ISE and PowerGUI 2.1 Script Editor (PGSE) addon for uploading code to PasteBin.com. This happens to be my first WPF addon for PowerShell ISE. The PGSE version of this will soon be out. I am looking at working around a bug in PowerShell. Looks pretty hard right now.   Now, coming to the subject, this addon module is written in such as way that it detects what scripting environment you are using and then extends the script editor menu options to add “Send to PasteBin” item. When you select some text in the editor and click “Send to PasteBin” or CTRL+B, the following WPF window appears.    You will see the above interface in PowerShell ISE. The top text box will have the content you selected in the script editor. The remaining options are quite self-explanatory. You can read about these options at http://pastebin.com/api.php.   You can use the “save preferences” button to make this addon remember you email ID, …

Send content to PasteBin using PowerShell

PasteBin.com is a good way to share scripts with others. Over there, you can just paste scripts written in almost any language and select the language for syntax highlighting. The interesting part here is that they provide an API to do that. Like anything else that got an API, this one can also be scripted using PowerShell. So, here is a simple module that lets you paste content to PasteBin using PowerShell.         

The usage of this is quite easy. There is really only one mandatory paramter, pasteCode. This parameter is used to specify the script code that you need to upload to PasteBin. Other parameters can be quite helpful. For example,    You can use pasteFormat to specify the language of the script so that PasteBin can enable syntax highlighting  pasteSubDomain to specify a subdomain name to upload your scripts to. For example, http://ravikanth.pastebin.com has all the script uploaded by me pasteEmail to send you an email with the PasteBin link pasteExpireDate to set how long the pose will be kept online and pastePrivate switch parameter to hide …

PowerShell ISE addon GUI for importing and removing modules

I (@ravikanth) & Bernd have been working on reviving the PSISECream codeplex project. We are trying to improve a few modules that are already a part of this project and adding new modules as required. The first step towards that goal was to provide a standardized way of adding and removing ISE addon menu items. Bernd did a great job at that and created ISECreamBasic module. You can use this module to add / remove ISE addon menu items. You can find the documentation for this module @ http://psisecream.codeplex.com/documentation. You can download v0.1 release of this project @ http://psisecream.codeplex.com/releases/view/42680 While ISECreamBasic is the core of the PSISECream project, it does not really add any addon modules. So, I started up writing a addon GUI to provide the functionality of importing and removing modules. If you have used PowerGUI script editor, this GUI addon is very similar to what you see in PowerGUI’s File -> PowerShell libraries option. You can download the PSISECream release here. As you see in the above screenshot, this GUI shows a list of …