Today we release a new build of PowerShell Studio 2016 and it includes some major changes and new features.
Project Changes and Compatibility
IMPORTANT: This build will convert your projects and create a backup of the original (*.psproj.bak). The new project version is not backwards compatible with older builds of PowerShell Studio.
We made changed to our projects in order comply with the best practices and warning produces by PSScriptAnalyzer. Previously, when you invoke a GUI or script file from a project, you had to use a reference function that used a Call verb. For example:
Call-MainForm_psf
The Call verb was used to distinguish it from other functions, but since Call isn’t an approved verb, PSScriptAnalyzer would produce a warning.
With this release, PowerShell Studio will replace the Call verb with the following verbs:
File Type | Verb | Example |
Form | Show | Show-MainForm_psf |
ps1 script | Invoke | Invoke-MyScript_ps1 |
When you open your project in PowerShell Studio, it will automatically update and refactor the Call reference functions in your project.
Renamed Project File Properties
We renamed some of the project file properties:
Old Name | New Name | Purpose |
Command Extension | Shared | If True, the ps1 file’s functions and variables are shared across the project and you will no longer be able to invoke the file. |
Reference Name | Reference Function | The name of the function that invokes the project file. |
Using Statements
Using statements were introduced with PowerShell V5.
#Requires -Version 5 using Module TestModule11; #Import classes from the module |
PowerShell requires that using statements much be located at the beginning of a script file, otherwise it results in an error:
ERROR: + using Module TestModule11; #Import classes from the module
ERROR: + ~~~~~~~~~~~~~~~~~~~~~~~~~
ERROR: A 'using' statement must appear before any other statements in a script.
With this release, PowerShell Studio will relocate using statements and requires comments to ensure to that the generated GUI and project scripts do not produce errors.
Performance Monitor
A major new feature, is the Performance Monitor, which displays the CPU and memory usage of your PowerShell scripts.
We previously announced the feature for PrimalScript 2016:
To enable monitoring in PowerShell Studio, check the option in the Ribbon (Home->Run->Monitor):
When monitoring is enabled, PowerShell Studio will graph the memory and CPU usage in real time and display the results are in the new performance panel.
For your convenience, the CPU and Memory usage is also displayed in status bar. This way you can still get a quick view of the statistics without having the monitor panel open.
The performance monitor will also display the last three results of a script, so that you can compare the performance differences of each run through.
The performance monitor will not record the statistics during debugging, because it will not produce an accurate result. The results would be skewed due to line breaking and variable querying.
New Packager Options and UI
We updated the packager UI in an effort minimize the choices and provide a preview and description of the available engines.
The packager is no longer restricted to a single platform selection:
You now have the option to build 32 Bit and 64 Bit platforms simultaneously. Additionally, the new Native platform option produces a starter executable to will launch the appropriate version of the executable for you.
For more details on changes to the packager, please refer to the following article:
https://www.sapien.com/blog/2016/10/24/sapien-script-packager-updates-and-new-features/
New View Tab
We added a new View tab, where you can hide and display panels and load layouts.
The View tab also allows you to create Tab groups and split views of the editor.
Navigation Bar Addition
The navigation bar will now display comments starting with #MARK:. You can use MARK comments to designate navigation points with in your script.
As you can see, the comment hash is no longer displayed to reduce visual clutter.
Please continue providing your feedback. Many of the new features included in the service builds are suggestions from users like you. Therefore, if you have any suggestions or feature requests, please share them with us on our Wish List and Feature Requests forum.
#PowerShell Studio 2016 Service Release plus Performance Monitor https://t.co/F1N20xLl6H
@SAPIENTech This release looks like it has a lot of cool new features. I have to develop a script this week, so perfect timing!
RT @SAPIENTech: PowerShell Studio 2016 – Service Release v5.3.130: Today we release a new build of PowerShell Studio 2016 and i… https://…
@Bwya77 @SAPIENTech I’m sorry to hear that. Please post the details on our forum and we will be happy to help https://t.co/OynTBY3Mgz
@SAPIENTech If i do download only then run it says the exe is corrupt
RT @SAPIENTech: PowerShell Studio 2016 – Service Release v5.3.130: Today we release a new build of PowerShell Studio 2016 and i… https://…
How much faster is Where method than Where-Object? @SAPIENTech #PowerShellStudio & #PrimalScript performance graph.
https://t.co/ntSCuvSe7r
RT @juneb_get_help: How much faster is Where method than Where-Object? @SAPIENTech #PowerShellStudio & #PrimalScript performance graph.
htt…
RT @SAPIENTech: PowerShell Studio 2016 – Service Release v5.3.130: Today we release a new build of PowerShell Studio 2016 and i… https://…
RT @SAPIENDavid: #PowerShell Studio 2016 Service Release plus Performance Monitor https://t.co/F1N20xLl6H