Reputation: 12885
When I do on my azure site in kudu cmd:
$PSVersionTable.PSVersion
then I get 4.0 for powershell.
I want to extract a zip file but I get this error from my webjob log file:
[02/02/2017 21:37:20 > b2afe2: ERR ] + Expand-Archive $output -DestinationPath $env:WEBROOT_PATH
[02/02/2017 21:37:20 > b2afe2: ERR ] + ~~~~~~~~~~~~~~
[02/02/2017 21:37:20 > b2afe2: ERR ] + CategoryInfo : ObjectNotFound: (Expand-Archive:String) [], Comm
[02/02/2017 21:37:20 > b2afe2: ERR ] andNotFoundException
[02/02/2017 21:37:20 > b2afe2: ERR ] + FullyQualifiedErrorId : CommandNotFoundException
[02/02/2017 21:37:20 > b2afe2: ERR ]
[02/02/2017 21:37:20 > b2afe2: SYS INFO] Status changed to Success
Well the Expand-Archive needs powershell 5.0 but how can I upgrade that on my azure site?
Upvotes: 1
Views: 187
Reputation: 43193
PowerShell 5.0 is not yet supported in Azure Functions, but we are looking to add that in the coming months. See https://social.msdn.microsoft.com/Forums/en-US/c4987e93-8617-43a7-969f-cc49aa723245/powershell-v5 for another instance of the question.
Upvotes: 2