aws-toolkit-azure-devops icon indicating copy to clipboard operation
aws-toolkit-azure-devops copied to clipboard

AWSPowerShellModuleScript please add argument for Powershell Core

Open msuter-cbre opened this issue 2 years ago • 1 comments

Describe the solution you'd like

Please add support for Powershell Core (version 6/7), and implement it the same way that it works for the native Powershell tasks in Azure DevOps. Suggested would be to add an argument under inputs called "pwsh" as a boolean value to enable the task to run as Powershell Core instead of Windows Powershell. This article documents how it's done for task PowerShell@2

https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/powershell?view=azure-devops

Additional context

Normally the task runs as Windows Powershell 5.1:

"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"

With pwsh set to true, it runs as Powershell Core:

"C:\Program Files\PowerShell\7\pwsh.exe"

msuter-cbre avatar Nov 13 '21 04:11 msuter-cbre

Any update on this? The Windows only version of AWSPowerShell is now described as the legacy version so it'd be good to be able to use the PS Core version in our pipelines

NickGraham101 avatar Aug 08 '22 09:08 NickGraham101