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.