Azure / Azure/azure-cli

az vmss run-command invoke fails with multiple VM ids

Open
#20,000 1 comment 0 reactions 1 assignee Claimed by @zhoxing-ms View on GitHub
act-observability-squad Compute customer-reported feature-request
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

> ### `az feedback` auto-generates most of the information requested below, as of CLI version 2.0.62

**Describe the bug**
I am using the az cli within PowerShell. I have tried the following, which only runs the command on the first VM instead of all the VMs listed:

`az vmss run-command invoke --command-id RunPowerShellScript --scripts `@script.ps1 --ids ((az vmss list-instances -n REDACTED -g REDACTED --query "[].id" --output tsv) -join ' ')`

I confirmed that the `az vmss list-instances` command returned ids for all the VMs in the VMSS.

**To Reproduce**
See above. (I am also internal and happy to debug this in real time :))

**Expected behavior**
I would expect the command to be run on all VMs in the VMSS.

**Environment summary**
az version 2.29.0
PowerShell version 5.1.19041.1237

**Additional context**
n/a

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.