---
title: "$PreferWindowsPowerShell"
---
When true, the script will be run using Windows PowerShell 5.1 where available. When false or on Linux (or on Windows systems without PowerShell 5.1 installed), the script will be run using PowerShell Core instead.
$PreferWindowsPowerShell