Today we released a new build of PowerShell Studio 2017 (v5.4.136).
In this build, we went down the list and implemented several user-requested features.
General Features:
Forwards and Backwards Navigation
We had several user requests for this feature. The new navigation feature allows you to jump back to previously visited documents or previous locations within the same document.
Ribbon->Home->Navigation
Navigate Forward | [Ctrl + Shift + +] |
Navigate Backward | [Ctrl + Shift + -] |
If you use the Go to Definition feature, it will take you to the declaration of a function. Previously, you had to scroll back to find where you left off, but now you can press the Navigate Backwards button and PowerShell Studio will jump back to your previous line, so you can continue to work uninterrupted. Navigation will also take you back to the previous document when you open or click on different document.
Editor Features:
Splatting
Another popular request was to add the ability to splat commands.
What is splatting?
Splatting is a method of passing parameter values to a command via a hash table or an array.
You can “splat” your commands by using the editor context menu.
The splat command converts the command parameters into a hash table and passes the variable containing the hash table to the targeted command:
Run Selection Resolving Functions
PowerShell Studio’s internal host resets the runspace every time you run a script. As a result, functions declared outside the section (or even in another project file), will not be defined when you use the Run Selection command.
With this new feature, you no longer have to include the function definition in the selection when using the Run Selection command:
In a project context, PowerShell Studio will also automatically resolve functions defined in other project files.
You have the option to disable this feature in Options->Editor:
Important: This option only applies to Run Selection and not to Run Selection in Console.
Using Namespaces
Windows PowerShell V5 introduced the using namespace directive:
using namespace System.Drawing
The using statement saves you from having to type the full name of a Type object.
For example,
[Color]instead of:
[System.Drawing.Color]
PowerShell Studio will now take into account the using namespace statement defined at the top of the document to correctly provide syntax coloring and PrimalSense support.
PrimalSense – Common Parameters
PrimalSense will now display common parameters at the end of the PrimalSense list when the Sort parameters alphabetically option is disabled. This ensures that the command parameters take precedence over common parameters.
Function Builder and Wildcards
We added the option to set the SupportsWildcards attribute via the Function Builder’s Parameter dialog:
function Get-Object { param ( [Parameter(Mandatory = $true)] [SupportsWildcards()] [string] $Name ) #TODO: Place script here } |
Project Features:
Project Files – Shared PrimalSense
Setting the Shared property of a project file tells PowerShell Studio to provide PrimalSense for the functions defined in the file, across the whole project. Previously, this setting only worked if the Build property was set to Include. With this service release, you can do the same with ps1 project files with the Build property set to Content.
This comes in handy when dealing with a module project where you dot source the files into the module programmatically and still get the benefit of PrimalSense when working with multiple content files.
Project Panel – Tooltip
When you hover over a file in the Project panel, it will now provide you with a tooltip containing the file path information.
Improved Project Load Speeds
Not a new feature, but it is worth mentioning that this build improves the loading speed of large projects.
Rename Refactoring and Manifests
When you rename a function using refactoring, PowerShell Studio will now update the module project’s manifest as well.
Other Features:
Tools Panel Content Menu
We added Bring to Front and Send to Back commands to the Tools panel’s select list content menu:
Now without having to find the control in the designer itself, you can send it straight to the top using the Bring to Front command using the Tools panel.
New Packager Options
This build introduces two new packager options that relate to Script Block logging.
Do not execute if Script Block logging is enabled
When enabled, this option will prevent the executable from running when Script Block logging is enabled on the host machine.
Disable Script Block logging while running
When enabled, the packaged executable will disable Script Block logging when executing. This setting requires admin privileges in order to disable the logging.
Important: If the executable is unable to deactivate logging, it will continue to run, unless you enable the do not execute option above.
These new options offer another layer of protection for scripts that contain sensitive information.
Silent Deactivation
The final feature added to this build is the command line option /DEACTIVATE to silently deactivate your software:
PowerShell Studio.exe /DEACTIVATE |
Note: The software will require internet access in order to deactivate a subscription number successfully.
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.
1 comment on “PowerShell Studio 2017: Service Release v5.4.136”
Comments are closed.