running az vm create with --nsg "" but it does not work

Michael P 41 Reputation points
2022-03-10T14:16:19.14+00:00

running by CLI: az vm create --nsg "" or --nsg " " so VM should be created without NSG, getting the error : argument --nsg: expected one argument

Azure Lab Services
Azure Lab Services
An Azure service that is used to set up labs for classrooms, trials, development and testing, and other scenarios.
280 questions
0 comments No comments
{count} votes

Accepted answer
  1. vipullag-MSFT 24,206 Reputation points Microsoft Employee
    2022-03-11T04:58:23.137+00:00

    @Michael P

    Thanks for reaching out on Microsoft Q&A Platform.

    Please make sure that you are running this Azure CLI command --nsg "" in bash/cmd prompt, incase you are running this command in PowerShell it will fail. So use --nsg """" to get over this error.

    Please check these relevant threads where this issue was reported in the past.

    https://github.com/Azure/azure-cli/issues/10786
    https://github.com/Azure/azure-cli/issues/11578

    Hope this helps.
    Please 'Accept as answer' if the provided information is helpful, so that it can help others in the community looking for help on similar topics.Hope this helps.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Michael Alpert 25 Reputation points
    2023-06-10T14:56:36.8166667+00:00

    I was able to get past the first step in the exercise. Thank you (first screenshot) But then I was not able to get past the second step in the exercise. (Second screenshot)

    Screenshot 1

    User's image

    0 comments No comments