Issue with Gitlab-Runner not finding PWSH as the executor

I’m attempting to execute Gitlab-Runner on a windows VM. I started the runner on a windows VM under Powershell. I can setup the runner in Gitlab but when I make a change to the repository I get a message that says:

ERROR: Job failed (system failure): prepare environment: failed to start process: exec: “pwsh”: executable file not found in %PATH%. Check Types of shells supported by GitLab Runner | GitLab for more information

The link in the message to more information does not help resolve the issue.

I am expecting the pipeline to report it executed on the windows VM.

I’m stuck and any suggestions would be appreciated.

So the solution was to modify the TOML file and change the shell option from PWSH to Powershell. Although the Gitlab register doesn’t allow “shell=powershell” you can edit the TOML file and change it.