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

Michael P 41 Reputation points

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.
282 questions
0 comments No comments
{count} votes

Accepted answer
  1. vipullag-MSFT 25,041 Reputation points

    @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.

    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

    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