Free Microsoft GH-200 Actual Exam Questions - Question 15 Discussion

Question No. 15
A development team has been using a Powershell script to compile and package their solution using
existing tools on a Linux VM, which has been configured as a self-hosted runner. They would like to
use the script as-is in an automated workflow. Which of the following should they do to invoke their
script within a workflow step?
Select one option, then reveal solution.
US
NH
Noah H.
2026-02-15

It’s D because using shell: pwsh directly taps into the existing PowerShell Core on the Linux VM. No need to convert or add extra actions if the environment’s set up right.

0
MI
Mason I.
2026-02-14

If the Linux VM already has PowerShell installed, using shell: pwsh (D) seems like the cleanest approach since it runs the script natively. The actions/run-powershell (E) action might add unnecessary overhead or complexity. Also, option B looks like it’s geared more towards Windows runners, so probably not the best fit here. Does anyone know if the VM's PowerShell version fully supports all the script features? That could be the real deciding factor.

0
MI
Mason I.
2026-02-14

It’s E too because actions/run-powershell is designed to run PowerShell scripts cross-platform, so it should handle the Linux environment without needing changes. That could be simpler than relying on the shell setting alone.

0
WA
Will A.
2026-01-30

B/D? Both let you run PowerShell scripts in YAML, but shell: pwsh (D) is simpler and directly supported on Linux runners. B might be more Windows-centric, so D feels more straightforward here.

0
IX
Irfan X.
2026-01-21

Maybe B could work too since it’s explicitly for Powershell in YAML, though I’m not sure if it’s different from shell: pwsh. I’d rule out C because converting scripts sounds unnecessary here.

0
IX
Irfan X.
2026-01-20

It’s D, running shell: pwsh works directly on Linux without extra actions needed.

0
IU
Irfan U.
2026-01-15

E. This action is specifically designed to run Powershell scripts and works cross-platform, which fits well with their Linux VM setup. It avoids the need for conversion or changing the runner OS.

0
NL
Noah L.
2026-01-15

Using shell: pwsh makes the most sense here, so D.

0