Lesstep
Azure Pipelines · agents · Checked November 6, 2026

Azure Pipelines: "Unable to locate executable file: 'pwsh'"

Before a task runs pwsh, bash, powershell, az or another tool, it looks for that file in the folders of the agent's PATH. When none has it, the task stops with this message (from the task library, which every task uses). The name in quotes is the file it looked for; the fix is to make that file exist on the agent, or to ask for one that does (questions on Stack Overflow with this message have been seen over 260,000 times).

When the failing step is part of a pull request's build validation, the pull request waits on it: Azure DevOps Pull Requests, a plugin for JetBrains IDEs, lists the pull request's branch policies with their state in your IDE, and with Pro runs a failed build policy again once the agent is fixed. Get it on JetBrains Marketplace

What it looks like

'powershell' on a Linux agent

The tool is not installed on a self-hosted agent

A pipeline variable named path

The agent service does not see your PATH

Azure DevOps pull requests in IntelliJ IDEA and Rider

Azure DevOps Pull Requests, a plugin by Lesstep for JetBrains IDEs 2024.1 or later and Android Studio, reads the organization, project and repository from your git remote and lists the pull requests that wait for your review in an IDE tool window, on Azure DevOps Services and on Azure DevOps Server. It shows the branch policies of a pull request with their state, so a required build that has not passed is next to its pull request, and with Pro you run a failed or expired build policy again from there. The review inbox is free; voting, commenting, completing and creating are Pro, with a 30-day trial.

Get it on JetBrains Marketplace

Azure DevOps, Azure Pipelines and PowerShell are trademarks of Microsoft Corporation; IntelliJ IDEA and Rider are trademarks of JetBrains s.r.o. This page is not affiliated with or endorsed by Microsoft or JetBrains.

More: no agent satisfies the demands · checkout stops with Git fetch failed with exit code: 128 · the dotnet task matched no project · 日本語