-
Notifications
You must be signed in to change notification settings - Fork 53
manually specify powershell version (e.g. 7) #371
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
Comments
The azure functions core tools (the one you run locally) might be able to do it but you'd have to modify the source code, there's no built in option. No roadmap's been published yet for upgrading the worker to 7, I imagine that will coincide with the upgrade from functions runtime v2 to v3. |
We will allow switching to PS7 soon after PS7 goes GA. Right now, the only way to use PS7 in Functions is to package/deploy the PS7 files together with your app and invoke pwsh.exe from your Function code (which I would recommend only if you have a very strong reason). By the way, Functions runtime v3 is currently released, and it also uses PS6. |
@AnatoliB Now that PS7 is GA, any timeline for being able to use this with Azure Functions v3 runtime? I see the code appears to be committed to the repo, but not sure how to use it either locally or in Azure Functions without building myself? |
@dpolivy Right now, building the worker from the dev branch is the only way. Expect PS7 to be available on Azure between the end of March and the middle of April. I will be updating this thread with more precise ETA and status as soon as I have them. |
@dpolivy you can also download the built nupkg from Appveyor, rename it to .zip, and then extract it from there Extract it to your workers directory for core tools per the readme. I installed azure-functions-core-tools using http://scoop.sh so mine is at |
@dpolivy @JustinGrote Thank you, Justin. If you do this, you also need to set the following variable before starting the function host locally: $env:FUNCTIONS_WORKER_RUNTIME_VERSION = '~7' You will not have to do this when we release PS7 support officially. |
@AnatoliB we are now at mid-april, can you provide a revised ETA? :) |
The situation is currently complicated by certain events beyond our control. The coding work is finished, but the deployment to Azure will probably happen around the middle of May. I'm sorry I don't have a more precise and reliable ETA, but this is the best I can do at this point. Thank you for your patience! |
@AnatoliB Understood! Thank you for all your hard work and I appreciate the update, it just helps to know how far out I should be looking at refactoring. |
@AnatoliB Is this in production now? Can you help me with the status? |
The Functions runtime with PowerShell 7 is being rolled out to production now, I expect it to complete by June 5. I will update this thread when complete. |
@AnatoliB, Really appreciate it! Thanks! |
@AnatoliB FYI I saw this today I've never seen before, may be related to rollout: |
Hi @AnatoliB , any update on when this will be in production? Thanks for working on this! |
The runtime rollout is almost finished and PowerShell 7 is available in many regions now, expected to finish the rest tomorrow (6/9). Portal and tools support will take a bit longer. In the meantime, in order to upgrade your app to PowerShell 7, set the $SubId = ...
$ResourceGroupName = ...
$AppName = ...
Set-AzResource -ResourceId "/subscriptions/$SubId/resourceGroups/$ResourceGroupName/providers/Microsoft.Web/sites/$AppName/config/web" -UsePatchSemantics -Properties @{ powerShellVersion = '~7' } -Force Any other way of updating ARM resources (Resource Explorer, ARM templates, etc.) should also work. Set the property to You may need to restart the app after this.
|
@AnatoliB great news, can you have them make a post on the Functions Blog about it when it's fully rolled out? |
@JustinGrote We will announce this officially only after the Portal and tools support catch up. Until then, I will just leave these instructions here. |
The rollout is complete now, PowerShell 7 is available in all the public regions. I'm closing this issue, but I will be updating it with the tools and portal status. In the meantime, please use the instructions above, and we will appreciate your feedback. |
The rough ETA for official GA (including portal and tools support) is the beginning of July. |
is there a way to change the used powershell version? would like to give powershell 7 rc1 a try as we have some code which doesn't work with PS6.
The text was updated successfully, but these errors were encountered: