Octopus Deploy Documentation

PowerShell Core

Last updated

In Octopus Version 2019.10.0 we released support for PowerShell Core. This feature will allow you to execute your PowerShell scripts on Linux Deployment Targets with PowerShell Core installed. When executing a PowerShell script as a part of a step, you can now specify whether Octopus should use Windows PowerShell or PowerShell Core during Windows deployments. For information on how this affects proxy configuration, see here.

My Windows target can not find my PowerShell Core installation
If you have picked a non-default location for your PowerShell Core installation, then ensure that pwsh.exe is available on your Path Environment Variable.

You can enable the option to select PowerShell Core from the Configure Features button on a step in your deployment.

custom feature

Enabling this feature will give you the option to use PowerShell Core to execute your PowerShell scripts. By default, Octopus will execute your PowerShell scripts using Windows PowerShell.

powershellcore

PowerShell Core on Linux Targets

You will first need to ensure that the pwsh executable is available on your $PATH before Octopus can use it.

This feature allows you to run your PowerShell scripts against Linux targets with PowerShell Core installed. However, there are some things to keep in mind.

If your package contains both .ps1 & .sh scripts and you are deploying to a non-Windows target, Octopus will attempt to execute both scripts. This may cause some unexpected behavior depending on the script, so ensure that your package only contains a single copy of your deployment scripts.

Welcome! We use cookies and data about how you use our website allow us to improve the website and your experience, and resolve technical errors. Our website uses cookies and shares some of your data with third party analytics companies for these purposes.

If you decline, we will respect your privacy. A single cookie will be used in your browser to remember your preference.