All posts filed under: PGSE Addons

PowerGUI Script Editor Addon: Custom menu item generator

PowerGUI Script Editor & PowerShell ISE support better extensibility. These two editors remain to be my script editors. So, I tend to port all my PowerShell ISE customizations to PGSE if such a feature isn’t available in PowerGUI. One such ISE customization I recently did was to enable custom menu item generation using GUI. You can read more about it here. While it is very easy to create addon menu items in ISE, PGSE isn’t that straight forward. So, I thought that this ISE customization should be ported to PowerGUI script Editor as well. So, here it is. You can download this addon from PowerGUI.org at http://powergui.org/entry.jspa?externalID=3311&categoryID=387 This is how the UI looks: The UI is pretty self-explanatory. In the options, “Menu Text”, “Menu Shortcut”, and “Script Block” are mandatory. At present, you can add only menu items under existing top-level menus. You won’t be able to add a top-level menu such as File or Edit. See To Do. Also, the code isn’t completely optimized. So, there is a very good chance that you will …