Advanced Features and Customization

The Options dialog contains all of the main configuration settings for PowerShell Studio. The next few sections highlight some of the settings that have not yet been mentioned.

General

Saving Settings

There are three buttons at the bottom of the Settings section that control the saving and loading of settings for PowerShell Studio:

These settings can not only be used to back-up your settings for your own use, but they can also be passed around to everyone on your team for standardization purposes.

Save All Settings

This button saves all application settings. Whenever you spend a lot of time getting your coding environment just the way you like it, you hate to have to set everything up again. Therefore, it's a good idea to export the settings from time to time. By default, the settings are saved to:

%HOMEPATH%\Documents\SAPIEN\PowerShell Studio 2015\Files\PowerShellStudio.Settings.xml

Here is a piece of the xml created:

Save Editor Settings

This button works the same way as the Save All Settings button, only it only saves editor settings.

By default, the settings are saved to:

%HOMEPATH%\Documents\SAPIEN\PowerShell Studio 2015\Files\PowerShellStudio.Editor.Settings.xml

Here is a piece of the xml created:

Load Settings

This button loads settings that were previously saved.


You will be required to restart the application for the changes to take effect.

Backup

NOTE: If you're about to do something in the script that you may want to rollback, click the Create button on the Restore Points menu on the Tools ribbon.

Console

Debugger

These settings configure the network ports that PowerShell Studio uses to connect to a remote installation of the Remote Scripting Execution Engine. You must use the same port numbers on any computer that you want to support the remote execution. When deciding on which ports to use, it is important to consult your network and security teams, as they will be able to advise you which ports are safe to use and, if required, reconfigure any firewalls. Port numbers are specified in the registry on a machine that is running the RSEE service.

The key is HKEY_LOCAL_MACHINE\Software\Policies\SAPIEN. The Value name is InPort (for the incoming port) and OutPort (for the outgoing port). Note that these values are most easily configured by means of a Group Policy Object (GPO), and we provide a template (ADM file) that can be imported into a GPO to configure RSEE.

Designer

Editor

These options customize PrimalSense and the appearance of the code editor panel.

Command Parameter Completion

You will notice a new popup window show up when typing a space after a command:

This popup window will display and allow you to cycle through the command's parameter sets. You can auto-insert the parameters by pressing [TAB] while the parameter set popup is visible.

Font and Color

Using this dialog, you can customize the font and coloring of PowerShell Studio's editor.

Presets

This allows you to quickly change the coloring scheme of PowerShell Studio's editor. At the top of the dialog, you will find a dropdown list that contains a list of all the coloring presets:

Default Presets

Description

(Current Settings)

Restores the settings to the last saved state.

PowerShell ISE

Changes the color scheme and font to match the default settings of the Microsoft PowerShell ISE.

PowerShell Studio

Changes the color scheme to the default PowerShell Studio coloring and font.

PrimalScript

Changes the color scheme to the default PrimalScript coloring and font.

When you select a preset, the font and coloring settings are updated to the predefined preset. Simply click the Apply button and PowerShell Studio will use the new coloring scheme. You can also create your own presets and share them with your colleagues if you wish. Simply configure the coloring setting and then press the Save As Preset… button. You will be presented with a Save As dialog.

Give the preset a name and press the Save button. Now the preset will be displayed in the drop down list:

Importing Presets:

To import a preset, copy the preset file (*.preset) to the following user specific folder:

C:\Users\<username>\AppData\Roaming\SAPIEN\PowerShell Studio 2015\Presets\

Next time you edit the font and colors, the preset will appear in the drop down list.

Edit Font and Coloring:

You can change the font of the editor and its size. All bolded fonts are fixed point fonts.

You can also change the background color of the indicator margin where the breakpoints, tracepoints and bookmarks are located:

 If you want to set the background transparent for specific items, you can right-click on the background color picker to bring up the context menu and select the Set to Automatic menu item.

Wrap Commands

We added the following commands which let you quickly wrap the selected text in quotes or braces:

Keyboard Shortcut

Wrap Selection In

Ctrl + Shift + 9

( )

Ctrl + [

[ ]

Ctrl + Shift + [

{ }

Ctrl + '

' '

Ctrl + Shift + '

" "

Assemblies

These are the assemblies that are loaded when you open a new or existing file.

These assemblies are used to provide PrimalSense support for Types and .NET objects. You can add assemblies to the Default Assemblies to ensure that they are loaded every time PowerShell Studio is started.

Formatting

PowerShell Studio 2015's code formatting is customizable to fit your needs:

Formatting Triggers

The first few options serve as triggers for auto formatting. These options tell PowerShell Studio when to format your script.

The following triggers can be enabled:

Formatting Rules

The second set of options allows you to customize the formatting rules of PowerShell Studio 2015.

NOTE: Most items above will be altered in the preview pane when changed, so that you can see what effect they have on your script.

Panels

PowerShell

Source Control