az vm create under PowerShell won't permit empty public-ip-address
See original GitHub issueDescription
Outline the issue here:
I first noticed this issue with my full az vm create command, and I progressively simplified it until it was basically just az vm create --resource-group TEST --name TEST-VNAS --public-ip-address ""
and it still threw the error: az vm create: error: argument --public-ip-address: expected one argument
. That’s when I finally thought maybe this is just an issue with az under PowerShell. So I tried my original full command under a simple Command Prompt window, and it worked fine.
Environment summary
Install Method: How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly)
Answer here: MSI on Windows 10 Pro
CLI Version: What version of the CLI and modules are installed? (Use az --version
)
Answer here: 2.0.9 (same version under PowerShell and CMD)
OS Version: What OS and version are you using?
Answer here: Windows 10 Pro
Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
Answer here: PowerShell (throws error) and CMD (no issues)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top GitHub Comments
–public-ip-address ‘“”’ worked. thanks.
The main reason is because it is assumed that people using Powershell would be using the Powershell cmdlets for working with Azure rather than Azure CLI 2.0.