Flyway PowerShell Executable Setting
Published 10 July 2025
Description
The PowerShell executable used for running PowerShell script migrations (.ps1 files).
Type
String
Default
"powershell" on Windows, "pwsh" on other platforms
Usage
Flyway Desktop
This can't be configured via Flyway Desktop, although it will be honoured.
Command-line
./flyway -powershellExecutable="pwsh" migrate
TOML Configuration File
[flyway]
powershellExecutable = "pwsh"
Environment Variable
export FLYWAY_POWERSHELL_EXECUTABLE=pwsh
API
Flyway.configure()
.powershellExecutable("pwsh")
.load()
Gradle
flyway {
powershellExecutable = 'pwsh'
}
Maven
<configuration>
<powershellExecutable>pwsh</powershellExecutable>
</configuration>
Notes
- PowerShell Core: Use
pwshto use PowerShell 7+ - works consistently across Windows, Linux, and macOS - Windows PowerShell 5.1: Use
powershellfor legacy Windows PowerShell - CI/CD Environments: Use
pwshfor consistent PowerShell version across different environments