79161397

Date: 2024-11-06 05:14:05
Score: 0.5
Natty:
Report link

To force an Azure Pipeline task to use PowerShell Core (specifically PowerShell 7+), you can specify the pwsh command in your pipeline YAML. This ensures that the task runs in the context of PowerShell Core instead of Windows PowerShell.

Here’s how you can do it:

Example YAML Pipeline yaml

Copier jobs:

yaml

Copier steps:

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Nguyen Tu