Found the answer myself.
See
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
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": ""
}
]
}
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
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.