Type of issue
Code doesn't work
Reference command name
az vm run-command invoke --resource-group litterbox --vm-name u2404 --command-id ifconfig
Feedback
The documented option to specify the 'vm' for this command is --vm-name. When running the command in the azcli using --vm-name produces
unrecognized arguments: --vm-name u2404
The functional way to achieve this is to use "--name" instead. I tested a different subcommand to az vm and that command also only worked with --name but not --vm-name, so it would stand to reason the doc is wrong. For reference, the other command was az vm boot-diagnostics get-boot-log, and that command's doc includes both --name and --vm-name although --vm-name doesn't work.
Page URL
https://learn.microsoft.com/en-us/cli/azure/vm/run-command?view=azure-cli-latest&source=docs
Content source URL
https://github.com/MicrosoftDocs/azure-docs-cli/blob/main/docs-ref-autogen/Latest-version/latest/vm/run-command.yml
Author
@mikefrobbins
Document Id
7c09f038-504f-ef6d-29be-6d2f0fc743d1
Type of issue
Code doesn't work
Reference command name
az vm run-command invoke --resource-group litterbox --vm-name u2404 --command-id ifconfig
Feedback
The documented option to specify the 'vm' for this command is --vm-name. When running the command in the azcli using --vm-name produces
unrecognized arguments: --vm-name u2404
The functional way to achieve this is to use "--name" instead. I tested a different subcommand to
az vmand that command also only worked with --name but not --vm-name, so it would stand to reason the doc is wrong. For reference, the other command wasaz vm boot-diagnostics get-boot-log, and that command's doc includes both --name and --vm-name although --vm-name doesn't work.Page URL
https://learn.microsoft.com/en-us/cli/azure/vm/run-command?view=azure-cli-latest&source=docs
Content source URL
https://github.com/MicrosoftDocs/azure-docs-cli/blob/main/docs-ref-autogen/Latest-version/latest/vm/run-command.yml
Author
@mikefrobbins
Document Id
7c09f038-504f-ef6d-29be-6d2f0fc743d1