-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Closed
Labels
Auto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamComputeaz vm/vmss/image/disk/snapshotaz vm/vmss/image/disk/snapshotPossible-SolutionSimilar-Issuecustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Description
Describe the bug
az version
$vmId = "<vm-id>"
$azResult = az vm run-command invoke --ids $vmId --scripts "Write-Host 'Test 123'" --command-id RunPowerShellScript
$azResult
Result version 2.77.0:
az version
{
"azure-cli": "2.77.0",
"azure-cli-core": "2.77.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {}
}
$vmId = "<vm-id>"
$azResult = az vm run-command invoke --ids $vmId --scripts "Write-Host 'Test 123'" --command-id RunPowerShellScript
$azResult
{
"value": [
{
"code": "ComponentStatus/StdOut/succeeded",
"displayStatus": "Provisioning succeeded",
"level": "Info",
"message": "Test 123",
"time": null
},
{
"code": "ComponentStatus/StdErr/succeeded",
"displayStatus": "Provisioning succeeded",
"level": "Info",
"message": "",
"time": null
}
]
}
Result version 2.78.0:
az version
{
"azure-cli": "2.78.0",
"azure-cli-core": "2.78.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {}
}
$vmId = "<vm-id>"
$azResult = az vm run-command invoke --ids $vmId --scripts "Write-Host 'Test 123'" --command-id RunPowerShellScript
$azResult
{
"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": ""
}
]
}
Related command
az version
$vmId = ""
$azResult = az vm run-command invoke --ids $vmId --scripts "Write-Host 'Test 123'" --command-id RunPowerShellScript
$azResult
Errors
'This is a sample script with parameters ' instead of 'Test 123' in result
Issue script & Debug output
az version
$vmId = "<vm-id>"
$azResult = az vm run-command invoke --ids $vmId --scripts "Write-Host 'Test 123'" --command-id RunPowerShellScript
$azResult
Result version 2.78.0:
az version
{
"azure-cli": "2.78.0",
"azure-cli-core": "2.78.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {}
}
$vmId = "<vm-id>"
$azResult = az vm run-command invoke --ids $vmId --scripts "Write-Host 'Test 123'" --command-id RunPowerShellScript
$azResult
{
"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": ""
}
]
}
Expected behavior
Result version 2.77.0:
az version
{
"azure-cli": "2.77.0",
"azure-cli-core": "2.77.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {}
}
$vmId = "<vm-id>"
$azResult = az vm run-command invoke --ids $vmId --scripts "Write-Host 'Test 123'" --command-id RunPowerShellScript
$azResult
{
"value": [
{
"code": "ComponentStatus/StdOut/succeeded",
"displayStatus": "Provisioning succeeded",
"level": "Info",
"message": "Test 123",
"time": null
},
{
"code": "ComponentStatus/StdErr/succeeded",
"displayStatus": "Provisioning succeeded",
"level": "Info",
"message": "",
"time": null
}
]
}
Environment Summary
azure-cli 2.78.0
Additional context
No response
Passie1982, gergroen, MarcelRoozekrans, aa2811, JoakimSimien and 7 more
Metadata
Metadata
Assignees
Labels
Auto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamComputeaz vm/vmss/image/disk/snapshotaz vm/vmss/image/disk/snapshotPossible-SolutionSimilar-Issuecustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that