Here’s another neat feature we have added in PowerGUI 3.0 – ability to reset PowerShell runspace when you need to.
All you have to do is:
- Go to Debug menu, and click Reset Runspace.
And that will give you a nice new shiny PowerShell session with no variables or other changes left from your preceding work!
You can also make PowerGUI automatically reset runspace each time you start debugging if you:
- On the Tools menu, click Options,
- On Debug Options tab, select Reset PowerShell runspace each time debugging is started.
I somehow prefer manual method to automated one because quite often there is value in left-over variables (you get intellisense for example!), loaded modules, and so on. However, I can then manually reset the runspace before my final debug session to make sure the script works fine in a clean environment.
Either way, now you have both options at your command! Happy scripting!
(Screenshot taken from the original PowerGUI 3.0 announcement which lists a lot of other great features we shipped in that release)
One of my favorite features in PowerGUI 2.4 is the add-on finder in PowerGUI Script Editor.
As you probably know, Script Editor has tons of extremely useful add-ons with great additional features: from script signing to built-in help explorer. However, you used to have to install the add-ons manually – and this was a bit of a hassle. Now, all you need to do is:
1. Go to Tools / Find Add-Ons Online,
2. Enter keyword to do a search (or just click Search to see everything),
3. Select the add-on you want and click Install.
That is it! Hopefully this makes your scripting experience even more exciting.
This add-on from James Brundage (from www.start-automating.com) lets you easily fine-tune the PowerShell host right in the PowerGUI Script Editor.
1. Download the PowerShell Preferences add-on from here,
2. Unblock the zip file,
3. Extract it to the My Documents \WindowsPowerShell \Modules folder,
4. In Script Editor’s File / PowerShell Libraries dialog box, select PowerShellPreferences.
And you will get this panel in the script editor, allowing you to change all the internal settings of the PowerShell host:
- Command history size,
- Error history size,
- Mail server for send-mailmessage,
- Strict mode (automated checking for variable initialization, etc.),
- What-if mode (automatically running all cmdlets with -whatif flag),
- Error level,
- Warning level,
- Debug level,
- Verbose message level,
- Progress message handling.
Combined, these give you incredible control over the way that PowerShell works – which in turn can help a lot when debugging your PowerShell scripts.
Download the add-on here.
This great PowerGUI Script Editor add-on by Gyorgy Nemesmagasi gives you the ability to browse PowerShell help topics right in the Script Editor (you can make the help window either float or be docked in the IDE) which makes it super-easy to lookup any PowerShell info when you need it:
The coolest part is that the add-on is loading all the information dynamically – so the cmdlet and alias list will depend on the actual set of snapins and modules you have, and the help information is in your language!
Very helpful and well worth checking out. Download the PowerShell Help Browser add-on here and make your PowerShell scripting experience even better!
Delivering a talk? James Brundage has just released an add-on giving you a rich demo environment right within PowerGUI Script Editor!
So next time you want to show PowerShell, all you need to do is:
1. Install James’ add-on onto your machine,
2. From Demo / Select Demo, chose the demo script you want to use,
3. Click Start Demo.
4. Then optionally undock the demo control window and move it to presenter screen so your audience does not see it and click Next as you proceed:
The demo will go command by command, at any time you can intervene and just execute something in the PowerShell Console pane, show variables, and so on. And obviously when you are done – you can just switch to another script.
This is basically Jeffrey’s start-demo script + ability to see the demo library right in the PowerGUI Script Editor + the nice reach environment with intellisense and other goodies!
Next time you present PowerShell – use James’ demo tool. Download it right away and give it a try.
This add-on is participating in the PowerGUI Challenge 2010. Got a great add-on idea? Take part in the contest!
Tweak color and font for any PowerShell element in PowerGUI Script Editor with this Script Color add-on which Denniver Reining from BitSpace.de has just posted:
If you spend a lot of time scripting, you might have your own preferences on the way your scripting environment displays keywords, cmdlet names, variable and so on. You used to be able to tweak these in PowerGUI Script Editor by manually locating and modifying one of our configuration files. Now there is an easy to use friendly graphical interface provided by Denniver’s add-on.
Download Script Color add-on and make PowerGUI Script Editor the PowerShell IDE of your dream!
Denniver’s add-on is participating in the PowerGUI Challenge 2010. Got a great add-on idea? Take part in the contest!
Getting PowerShell scripts with syntax highlight and line numbers into your blog, Word document or Outlook email is now easier than ever before! Once you download Karl Mitschke‘s Copy to Colorized HTML add-on, extract it to the modules folder and select it in the PowerShell Libraries dialog box, you’ll get Edit / Copy As / Colorized HTML (Ctrl-H) command added to PowerGUI Script Editor menu.
Select the script, click the command, then paste the code into your email, document or other rich text control editor such as Live Writer.
Note, that this add-on is different from the native Copy As / HTML functionality which puts into clipboard plain text with HTML tags – this you would paste into HTML editing window of your blog, Karl’s add-on output – into a rich text editor. Nice complementary pieces of functionality. Now we got everything covered!
Karl’s add-on is participating in the PowerGUI Challenge 2010. Got a great add-on idea? Take part in the contest!
Kirk has just updated his Script Editor add-on allowing you to sign your PowerShell scripts.
Script-signing is a highly-recomended best practice in PowerShell and the best way to prevent accidentally changed scripts or scripts downloaded from the internet and not properly tested and verified to be executed in your environment.
Kirk’s add-on is a great way to have code-signing integrated right into your script development environment absolutely for free. This is also one of our most popular add-ons which already had more than 700 downloads.
The new features include:
- Replaced test certificate functionality with View Certificate, and updated result to show the certificate properties in the native windows dialog,
- Updated script signing certificate search algorithm to search only in the “My” containers (the only places where script signing certificates will be stored),
- Switched the default signing method to include all certificates in the chain.
Download the PowerShell Script-Signing add-on for PowerGUI here and let us know what you think.
Check out the snippets for PowerGUI Script Editor that Bhargav Shukla just shared here. They offer nice templates which you can re-use when working on your scripts.
I downloaded and extracted the files to the snippets folder:
Started PowerGUI Script Editor, pressed Ctrl-I and could see the new snippets:
Here is what – for example – Custom_Script.Header gave me – very handy!
Check out these snippets here. And obviously if you have you own custom snippets that you created and are using – please consider sharing them with the community.
Published July 22, 2010
IDE , PowerShell , Visual Studio
[UPDATE] If you missed the live interview, the recording is available here.
At 9:30 pm EST/6:30 pm PST join PowerScripting podcast hosts and Adam Driscoll to learn more about how you can have rich PowerShell scripting environment right in Visual Studio.
While I personally mostly use PowerGUI Script Editor and think that this is the best tools for IT professionals, software developers use and love Visual Studio and it is great that they can now develop PowerShell parts of their projects without ever leaving their favorite tool.
So tonight at 9:30 pm EST/6:30 pm PST join the live interview & chat, hear what others are saying and ask questions on your own!