Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure PowerShell Task v4 on Windows needs option to run on PowerShell core #10328

Closed
bgelens opened this issue May 7, 2019 · 8 comments
Closed

Comments

@bgelens
Copy link

bgelens commented May 7, 2019

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).

@RoopeshNair
Copy link
Member

We are looking into it. will check the feasibility of providing an option to switch to core. We can make PS Core as default in future versions.

@bgelens
Copy link
Author

bgelens commented May 14, 2019

Nice, fyi, the PowerShell task already has this capability.

@ghost
Copy link

ghost commented Jun 21, 2019

I think this is a must because in the current state this task behaviors completely different on windows and non-windows agent.

@MisinformedDNA
Copy link
Contributor

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.

@20shivangi
Copy link
Contributor

The support of PowerShell core in Windows for task AzurePowerShellV4 is recently added in this week. It will take at least 3-4 weeks to get deployed.

@bgelens
Copy link
Author

bgelens commented Sep 19, 2019

Great news!

@20shivangi
Copy link
Contributor

Merged PR : #11326

@20shivangi
Copy link
Contributor

20shivangi commented Nov 11, 2019

The change has been rolled out, thereby closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants