az vm run-command has stopped working today

Tat Sing Kong 0 Reputation points
2025-10-21T11:15:50.5066667+00:00

Hello,

My az vm run-command worked fine for a week, and now whatever I send I get the response "This is a sample script with parameters ". I know that it's not running my script as that is the default sample. When I try this command rdp'd onto the VM it's fine. Anyone else having problems, is there some sort of outage?

Here's a simple example..

PS C:\dev\development\aspnet\WebApp\bin> az vm run-command invoke `

>> --resource-group "redacted" `

>> --name "redacted" `

>> --command-id RunPowerShellScript `

>> --scripts "Write-Host hello"

{

"value": [

{

"code": "ComponentStatus/StdOut/succeeded",

"displayStatus": "Provisioning succeeded",

"level": "Info",

"message": "This is a sample script with parameters "

},

{

"code": "ComponentStatus/StdErr/succeeded",

"displayStatus": "Provisioning succeeded",

"level": "Info",

"message": ""

}

]

}

Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Tat Sing Kong 0 Reputation points
    2025-10-21T12:49:47.66+00:00

  2. Ankit Yadav 4,385 Reputation points Microsoft External Staff Moderator
    2025-10-21T13:21:01.8366667+00:00

    Hello Tat Sing Kong

    This command looks like has been run from Azure CLI, can you please try to run it from VM Portal UI page:

    Inside Azure Portal ->Go to your VM -> Operations -> Run command -> RunPowerShellScript

    User's image

    then after clicking this, you'd see a pop up to enter your script, enter your script and run the command and see if that works out for you .

    Let me know if this also fails for you.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.