Azure PowerShell Task v4 which is currently in preview runs PowerShell core on any non Windows Image / Agent. On a Windows agent however, it decides on it's own to run Windows PowerShell with no way to overwrite it even though PowerShell Core is installed.
I'd like an option to set Core on Windows for this task (for me it would be the default).
The text was updated successfully, but these errors were encountered:
This issue just cost me hours of my life. I was trying to run ConvertFrom-Json $appSettings -AsHashtable and it kept complaining about AsHashtable. Turns out that AsHashtable only exists in Powershell Core. :( Switching to non-Windows isn't an option as we still use MSDEPLOY in a subsequent task. I can write my own version of AsHashtable, it's just annoying and confusing to run into a versioning issue.