-
Notifications
You must be signed in to change notification settings - Fork 4k
Manged Run command on Windows VM (SetAzVmRUnCommand) is deafulting to powershell 5.1 #22509
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
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Drewm3, @TravisCragg-MSFT, @nikhilpatel909, @sandeepraichura, @hilaryw29, @GabstaMSFT. Issue DetailsDescriptionI am trying to execute Powershell scripts using run commands on Windows VM. I have powershell 7 installed on the server. But Powershell 7 is not selected and it defaults to Powershell 5 while executing Run commands. Is it possible to select Powershell 7 for execution via run co mmands (Invoke Az VM run command/Set AzVM Run command)? Issue script & Debug outputPowershell script executed via https://learn.microsoft.com/en-us/azure/virtual-machines/windows/run-command-managed Environment dataAzure Windows VM server 2016 Module versionsPowershell 7 Error output.
pwsh.exe : The term 'pwsh.exe' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or
if a path was included, verify that the path is correct and try again.
At C:\Windows\System32\WindowsPowerShell\v1.0\profile.ps1:3 char:1
|
@nikhilpatel909 can you have a look at this? |
This will be a new feature request to Powershell team. |
My bad, This is actually a feature request to run command so it will stay with me, We will evaluate and prioritize. |
@Satyadm123 this is still on our roadmap and we are in internal discussions on this topic. |
@Satyadm123 we are testing a change and expect to be releasing an update once testing is completed. |
Get @GabstaMSFT, any update on this? It selecting 5.1 is causing some issue for me as I need some features that are only available in PowerShell Core |
@AlexanderSehr we have started rolling out the change to Azure, once the rollout is complete I will update here. I anticipate it will be completed by the end of the month. |
@GabstaMSFT any update on this? (we are on West-Europe) |
The rollout has completed and this issue should be resolved. |
@GabstaMSFT is there any documentation on how to use PowerShell 7 with managed run commands?
|
Hi @klamir051 ,
|
Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you! |
Description
I am trying to execute Powershell scripts using run commands on Windows VM. I have powershell 7 installed on the server. But Powershell 7 is not selected and it defaults to Powershell 5 while executing Run commands. Is it possible to select Powershell 7 for execution via run co mmands (Invoke Az VM run command/Set AzVM Run command)?
I have tried creating a profile and mentioning pwsh.exe but I get error when I execute a Powershell via SetAzVMRun Command
Issue script & Debug output
Environment data
Azure Windows VM server 2016
Module versions
Powershell 7
Error output
The text was updated successfully, but these errors were encountered: