Getting to know PowerShell has been a major project for me in the last year. I’ve learned that the PowerShell command line tool and shell environment offer a lot more power and flexibility than just creating one off commands. Microsoft provides an integrated scripting environment (ISE) with PowerShell, and it does work, but there are a few things about the third party players that just work better for me.

Last month, I reviewed another PowerShell helper called PowerShell Plus. This time, I’ll tell you about PowerShell Studio 2012, which brings quite a few things to the table, depending on what you hope to accomplish with PowerShell.

Figure A

PowerShell Studio 2012

What PowerShell Studio offers

Sapien is no stranger to solid Integrated Scripting Environment (ISE) tools; they have been building these tools for quite a while. Bringing an ISE out that is fully focused on PowerShell is a great idea, especially for learning the language. Some of the things that stand out include:

Build an application: A forms designer helps you build a Windows application on top of PowerShell. For example, there may be a task, like unlocking Active Directory user accounts that you want to hand off to your organizations help desk staff. Because some of them may not be comfortable yet with PowerShell, building a GUI interface for this purpose might be a great move. The application can then be deployed to the help desk users as needed.
Script Signing: PowerShell, by default, does not allow the execution of remote scripts. This includes more than just scripts that live in remote locations. Scripts developed on remote systems are also unable to be executed without some help from PowerShell.

The PowerShell scripting host (powershell.exe) will need to be run in unrestricted mode, allowing all scripts to run, or the script will need to be signed before it can be run. The reason for this is to help protect your system (and other systems where the script might be used). PowerShell Studio can be configured to add a signature, using a certificate, to any scripts that are saved by the application. This is a great feature as well.

Less reinventing the wheel and typing overall: I am certainly not a seasoned programmer by any stretch of the imagination, but if I can reuse code previously written, I am all for it. Using snippets in PowerShell Studio can help accomplish this with code that I have written, but also with common code used in PowerShell scripts.

PowerShell supports comment based help, which makes it very easy to add help documentation to scripts or functions you write. The way to add this code to a script you are working with requires there to be a special set of comments at the top of the script.  he formatting of this comment set looks similar to the following:

             Description of the function.
             A detailed description of the function.
       .PARAMETER  ParameterA
             The description of the ParameterA parameter.
       .PARAMETER  ParameterB
             The description of the ParameterB parameter.
             Get-Something -ParameterA 'One value' -ParameterB 32
             Get-Something 'One value' 32
             Additional information about the function go here.

The comment items aren’t too bad to enter, but until you have been doing it for a while, it can be hard to remember all of the pieces needed. Fortunately, the PowerShell Studio snippets feature has one for comment based help to quickly insert the help outline in a script.

Adding sets of PowerShell code or comments to a script is great, but PowerShell gets more and more commands every time a product that can use the technology is released or updated. These items, called command-lets, are essential in working with and learning PowerShell. The PowerShell Studio environment also includes PrimalSense to complete known commands or variables as they are typed. When entering your script, known command-lets and variables are popped up for selection. The closest match can be selected by pressing Tab. Other selections can be found with the arrow keys and then selected with the Tab key. An example of PrimalSense used by PowerShell Studio is shown in figure B.

Figure B

Using autocomplete to speed up script creation (click to enlarge)


Because I am still learning PowerShell, I like the extra help of the environment and being able to see the code I am working on. Yes, you can write scripts in Notepad, but the available snippets and PrimalSense are very helpful. I have not covered every feature and function available in this application, but these are some of the highlights that I think make it worthwhile. The best reason to learn a new language or environment like PowerShell is to solve a problem or improve how a task is handled. PowerShell studio allows that while maintaining the ability to provide complete solutions (GUI included) to others in your organization.

PowerShell Studio has the following system requirements:

  • Windows XP SP3/Vista SP1/Server 2003/Server 2008 or Windows 7
  • 200MB free disk space
  • 2GB RAM
  • Processor capable of running Windows XP
  • .NET Framework 4.0 (Full)

The application includes a free trial. A license for the application is a bit hefty at $349, but could be worth the cost if you are really going to get into PowerShell development. It is certainly worth checking out the trial.