# To get the instance IDs of all the instances in the VMSS, use the following command:azvmsslist-instances--resource-group$MC_RESOURCE_GROUP_NAME--name$VMSS_NAME--outputtable--query"[].instanceId"# For one instance, you can use the following command to get the instance ID:VMSS_INSTANCE_IDS=$(azvmsslist-instances--resource-group$MC_RESOURCE_GROUP_NAME--name$VMSS_NAME--outputtable--query"[].instanceId"|tail-1)
Use an instance ID to test connectivity from the HTTP proxy server to HTTPS
azvmssrun-commandinvoke--resource-group$MC_RESOURCE_GROUP_NAME\--name$VMSS_NAME\--command-idRunShellScript\--instance-id$VMSS_INSTANCE_IDS\--outputjson\--scripts"systemctl status waagent"