From 0234f13d1e10a0ca9da1c90aa2daba264408bf7a Mon Sep 17 00:00:00 2001 From: Andreas Mirbach <6332034+mirbach@users.noreply.github.com> Date: Sun, 9 Aug 2026 17:43:11 +0200 Subject: [PATCH] docs: document the PowerShell engine selector for script tasks --- docs/04-Console/13-profiles.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/04-Console/13-profiles.md b/docs/04-Console/13-profiles.md index 7dfda48..52dffff 100644 --- a/docs/04-Console/13-profiles.md +++ b/docs/04-Console/13-profiles.md @@ -100,6 +100,12 @@ If you want to install or uninstall an MSI file using WinGet, you’ll need to s When you add a task to execute a PowerShell script **you can choose between running the script only once or running it every time the endpoint applies the profile**. If you choose to **run the script once** an entry will be created in the agent’s config file **if the script was successfully executed**, if not **it will run again the next time the profile is applied**. +You can also choose which PowerShell engine runs the script: + +- **Windows PowerShell 5.1** (default): the built-in engine present on every Windows endpoint. +- **PowerShell 7+ (pwsh)**: uses the modern, cross-platform PowerShell engine. If the endpoint doesn't have PowerShell 7+ installed, the task fails with a clear error instead of silently running under 5.1. +- **Auto**: uses PowerShell 7+ if it's installed on the endpoint, otherwise falls back to Windows PowerShell 5.1. + ## Notes about profiles ### Max profile running duration