Error: pwsh.exe is not recognized as a command or operable program

Teja Alavelli 0 Reputation points
2025-02-20T07:39:22.6366667+00:00

I have 7 runbooks scheduled to run daily but there failed with exception error starting this week. runbooks were working fine previously on schedule.

I can run manually successfully but it take long time at Queued status and end up failed on schedule.

Error as following:

pwsh.exe is not recognized as a command or operable program. Install the language interpreter and add the installation path to PATH environment variable. If installation was done recently, restart the Hybrid Worker Service for extension based installation or restart the Microsoft Monitoring Agent for agent based installation. Looking for the executable at default location C:\PowerShell7\pwsh.exe.

anyone can share how to resolve the above error with steps by steps?

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,313 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.