Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 

In this article, we demonstrate how to setup and use PowerShell Core in PowerShell Studio 2018.

Setting up PowerShell Core in PowerShell Studio

If PowerShell Core is already installed on your system, PowerShell Studio has already detected it and it is ready to use in the Console panel:

PSS2018 pwshCore 01 2018 03 21 16 04 58 300x170

Remember, PowerShell Core will keep evolving. Whenever you upgrade to the next version of PowerShell Core, you will need to manually update the path to the console shell executable ("pwsh.exe") in PowerShell Studio.

For example, the initial PowerShell Core default path in PowerShell Studio is:
"C:\Program Files\PowerShell\6.0.1"

But, at the time of this article, the latest PowerShell Core version is "6.1.0-Preview.1". You would need to change the default path to:
"C:\Program Files\PowerShell\6.1.0-Preview.1"

Follow these steps to change the PowerShell Core path in PowerShell Studio:
1. From the Home tab on the ribbon, select Options.
2. Select Console, and look in the Consoles section.

In the Consoles section, the path can be changed, or you can add more console shells to the existing list:

PSS2018 pwshCore 02 2018 03 21 16 04 58

To apply the changes, you will need to save the changes and restart PowerShell Studio.

Working with PowerShell Core in PowerShell Studio

Follow these steps to execute PowerShell Core scripts from the PowerShell Studio Console panel:
1. Select PowerShell Core 64bit from the Console panel drop-down list.
2. Highlight the code to be executed.
3. Press F8 to Run Selection in Console, or right-click and select Run Selection in Console.

PSS2018 pwshCore 04 2018 03 21 16 04 58

Notice that PowerShell Studio will not execute the *ps1 file for PowerShell Core scripts. If you press the Run button it will assume Windows PowerShell and not PowerShell Core.

The ability to Run and Debug the PowerShell Core script file will be implemented in a future release.

Related Links

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 © 2019 SAPIEN Technologies, Inc.