User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active
 

Some of you may have already encountered this. You upgraded your system to PowerShell V3 and you asked how do I get PrimalScript or PowerShell Studio to recognize the new version of PowerShell? This article addresses that very question. You can accomplish this by following the steps outlined below. This article will also cover the case where you add a new module or snapin as well.

Updating PrimalScript & PowerShell Studio:

Step 1: Registering the dependent controls.

You will need to register the dependent PowerShell controls for the product. Depending on if the correct PowerShell version was present when you initially installed the product, it might be necessary to re-register the controls. This can be done by running RegisterControls.exe. This executable is located in the same directory as the application:

PrimalScript:

C:\Program Files\SAPIEN Technologies, Inc\PrimalScript [YEAR]\RegisterControls.exe

PowerShell Studio:

C:\Program Files\SAPIEN Technologies, Inc\PowerShell Studio [YEAR]\RegisterControls.exe

register the dependent PowerShell controls

When the above window appears, check the relevant versions of PowerShell to register and press OK.

Note: The RegisterControls.exe updates both products, so you need only run it once.

 

Step 2: Update the Cache

Once the appropriate PowerShell controls are registered, you also need to update the PowerShell cache used by both applications.

Note: You need only update the cache in one application, since both products share the same cache information.

Update the Cache in PrimalScript:

1. Access the Options via the File menu:

Ribbon->File->Options

Ribbon->File->Options

2. In the Options window go to the Text Editor->PrimalSense category and press the “Clear Cache” button.

Options--- Text Editor->PrimalSense ---Clear-Cache

3. The cache will automatically rebuild. You may need to restart PrimalScript in order to see the changes.

PrimalScript

 

Update the cache in PowerShell Studio:

1. Go to the PowerShell Browser located in the Object Browser Panel and press the Refresh button.

PowerShellStudio Refresh

 

Now you are ready to use the new version of PowerShell in your favorite SAPIEN IDE.

 

Here are some other situations you may encounter as well:

Installing New Modules or Snapins:

If you install a new module or snapin, you will need to rebuild the cache as described in Step 2 in order to view the cmdlets in both products.

Importing External Caches:

There might be times when you will need to write a script on your local machine that is designed to run on a server which has modules and cmdlets you do not have locally. For this very reason, PrimalScript and PowerShell Studio allow you to import external cache profiles from servers and provide PrimalSense support for those external cmdlets. Please refer to the following article for more details:

Developing PowerShell scripts for other machines

 

If you have questions about our products, please post in our support forum.
For licensed customers, use the forum associated with your product in our Product Support Forums for Registered Customers.
For users of trial versions, please post in our Former and Future Customers - Questions forum.
Copyright © 2024 SAPIEN Technologies, Inc.