2014/03/18

PowerShell Studio 2014 from Sapien released!

SAPIEN released a new version of their awesome tool PowerShell Studio a few days ago: SAPIEN PowerShell Studio 2014.

PowerShell Studio is a Toolmaking Environment, a PowerShell Integrated Scripting Environment (ISE) tool that let you edit and debug scripts, create package, installer, executable and deployments. Also, the Enhanced Form Designer makes GUI design fast and easy, eliminating the need to manually write hundreds of lines of code.

This is for me one of the best tool on the market when you need to create PowerShell Scripts/advanced functions and Graphical User Interface.

The tool is listed at 389$ USD which comes with a one year subscription. Once this subscription expire you'll have to renew it in order to continue receiving new updates/features, otherwise you can continue using the tool without updates. Check out the following blog article for more details: Starting with the 2014 versions all SAPIEN software sold with subscription

In the following post I will talk about the changes I noticed in the PowerShell Studio 2014 compared to PowerShell Studio 2012. I listed the "What's new" items based on what I discovered so far, Some information might be inaccurate since I don't have any documentation yet.

I did not get a chance to play with package, installer and deployment options, so this will be covered in another blogpost.





What's New ?

Below I listed the new options/tools/features that I noticed.

RIBBON UI

Home tab
New Abilities to Create a Package, an Installer, a Deployment or an Executable file in the Deploy section.
New Tools: Format Script and Build Function (see below for more details)


Designer tab
New Abilities to Preview the GUI, Create/Apply Property Set, Create Control Set, Create Form Template.
New Ability to change the theme (preview below)

Deploy tab
Same New Ability that you find in Home/Deploy dropdown menus.

Tools tab
New Abilities related to Restore Points (seems to be only related to the GUI making) and Source Control (Seems to work only if VersionRecall 2014 is installed)





NEW TOOL: FUNCTION BUILDER

This tool will help you creating advanced functions without typing all the code and syntax, all you need to do is to launch it from the Ribbon UI or by right clicking in your script, see below.


"Build Function" in the Ribbon UI
"Build Function" using right click





Main Window: Function Option

From here you can edit all the options related to the function:

  • Name of the function Verb/Noun,
  • Parameter
    • Name
    • Mandatory option
    • Type
    • Parameter Set Name
  • Cmdlet Binding options,
  • Parameter Set Names,
  • Output Type.

Function Builder Tool

Parameter Type Auto-complete

Output Type Auto-complete



Parameter Options

You can define each of the Parameter options using the small icon at the end of each parameter lines, this will open the following window.
Accessing Parameter Options window

Parameter Options: Parameter Set and Settings

Parameter Options: Validation

Once you are done, the function will be inserted in your script:

<#
    .SYNOPSIS
        A brief description of the Get-LazyWinAdmin function.

    .DESCRIPTION
        A detailed description of the Get-LazyWinAdmin function.

    .PARAMETER  Blog
        A description of the Blog parameter.

    .PARAMETER  Post
        A description of the Post parameter.

    .PARAMETER  Twitter
        A description of the Twitter parameter.

    .PARAMETER  Retweet
        A description of the Retweet parameter.

    .PARAMETER  Count
        A description of the Count parameter.

    .PARAMETER  Year
        A description of the Year parameter.

    .PARAMETER  Limit
        A description of the Limit parameter.

    .EXAMPLE
        PS C:\> Get-LazyWinAdmin -Blog $value1 -Post $value2
        'This is the output'
        This example shows how to call the Get-LazyWinAdmin function with named parameters.

    .OUTPUTS
        psobject

    .NOTES
        Additional information about the function or script.

#>
function Get-LazyWinAdmin
{
    [CmdletBinding(DefaultParameterSetName='Blog',
                   ConfirmImpact='None')]
    [OutputType([psobject])]
    param
    (
        [Parameter(Mandatory=$true,
                   ParameterSetName='Blog')]
        [ValidateScript()]
        [system.sByte]
        $Blog,
        [Parameter(ParameterSetName='Blog')]
        $Post,
        [Parameter(Mandatory=$true,
                   ParameterSetName='Twitter')]
        $Twitter,
        [Parameter(ParameterSetName='Twitter')]
        $Retweet,
        [Parameter(ParameterSetName='Twitter')]
        $Count,
        [Parameter(ParameterSetName='Twitter')]
        $Year,
        [Parameter(ParameterSetName='Twitter')]
        $Limit
    )
}


NEW TOOL: FORMAT SCRIPT

This tool allows you to format your script properly, indents, brackets, etc...
For example, here is a piece of poorly formatted code...



By pressing the button "Format Script", we get the following... Neat! :-)





NEW TOOL: RESTORE POINT

PowerShell Studio 2014 can now create Restore Point for you, automatic and manual.

  • Automatic Restore Point will be created automatically by PowerShell Studio 2014, this restore point will contains the first version of you file (beginning of your session)
  • Manual Restore Point will be created when you click on "Create" in the Restore Point Group of the Ribbon UI. Pressing "Create" again will overwrite the previous Manual Restore Point




Automatic Restore Point
Automatic Restore point will create a backup of your script file as soon as you start modifying it.

In this example, I create a new PowerShell Script  and save it.
We can see PowerShell Studio is creating two files as soon as I save the file.

Note: If you open an existing file, the TempPoint will be created only when you start to modify it.


New PowerShell Script saved as testfile.ps1

testfile.ps1 and the automatic Restore point created by PowerShell Studio 2014: testfile.TempPoint.ps1

You can see the file  testfile.TempPoint.ps1 file contains exactly the same thing as testfile.ps1

testfile.TempPoint.ps1



Now, If I make a modification to testfile.ps1 and save it...

testfile.ps1
testfile.ps1 and testfile.TempPoint.ps1 now have a different Time of modification

Notice the testfile.TempPoint.ps1 still have the initial content.


What about Restore ? In the Ribbon UI, you can click on Rewind to cancel all the changes made.
PowerShell Studio 2014 will ask you to confirm and then overwrite you file if you click OK

Rewind button in the Ribbon UI/Restore Point Group
Confirmation dialog after clicking on Rewind
The file is now restored.
"Date Modified" property are now the same for both file.


Manual Restore Point
PowerShell Studio 2014 allows you to create one restore point manually.
All you have to do is click on the Create button in the Restore Points group of the Ribbon UI.
By Pressing "Create" again, you will overwrite the previous Manual Restore Point.


Example, Before I create a Manual Restore Point:

Notice the Create button on the top left

I have one file saved: TestRP.ps1 and PowerShell Studio 2014 created an automatic Restore Point for me TestRP.TempPoint.ps1 for me


Once you press Create, the grayed out buttons become available.
Restore button: Restore to Manual Restore point
Delete button: Delete Manual Restore point
Rewind button: Restore the Automatic Restore point

Restore Points Group

PowerShell Studio 2014 created another file for my manual Restore Point: TestRP.RestorePoint.ps1


Creating another manual Restore Point overwrite the first one.




Thanks for reading! If you have any questions, leave a comment or send me an email at fxcat@lazywinadmin.com. I invite you to follow me on Twitter @lazywinadm / Google+ / LinkedIn. You can also follow the LazyWinAdmin Blog on Facebook Page and Google+ Page.

6 comments:

  1. The best powershell tool out there!! thank you for posting FX!

    ReplyDelete
  2. I'm not scripting enough to justify the costs and also do not really need the added features. But I have to admit it adds some great features over the standard ISE.

    ReplyDelete
  3. Thanks for your comment Bjorn!
    Yeah I have to admit... for a single admin it could be a bit expensive.

    I first bought PrimalForms 2011 a couple of years ago, and it really saved me time to create tools for my IT colleages, today I really can't work without this tool (for the user interface design part)
    However If you just need an ISE, well yeah PowerShell ISE will do the job, especially with the nice Addons you can find out there...


    Thanks again for your comment, appreciated.

    ReplyDelete
  4. Ladislav Fitness-Physique NovyThursday, April 3, 2014 at 8:09:00 AM EDT

    Thanks for great description of new features in Studio 2014. Cheers from Czech Republic :)

    ReplyDelete