[Feature]: Unify Az PowerShell command / args structure with Azure CLI #21927
Replies: 3 comments
This comment has been hidden.
This comment has been hidden.
-
Hi @byteknacker thanks again for the feedback. The inconsistency of Azure PowerShell and CLI lies deeper as they are designed with fundamentally different design guidelines. |
Beta Was this translation helpful? Give feedback.
-
Description of the new feature
Dear Microsoft Team,
I appreciate your effort in bringing the full range of Azure administration capabilities to both PowerShell and Azure CLI. What I noticed is that most of the time, the command names, structure and argument names do not match between these two command line languages.
I would propose that you refactor the PowerShell command line for Azure in such a way that there is a very easy one-to-one mapping between the commands and args of PowerShell and CLI.
Example of current status quo:
PowerShell:
Register-AzResourceProvider -ProviderNamespace Microsoft.Insights
Azure CLI:
az provider register --namespace Microsoft.Insights
Notice here that you cannot guess one from the other. There is no easy mapping between Register-AzResourceProvider and az provider register. The word ordering is reversed. The -ProviderNamespace is not the same as --namespace.
Proposed implementation details (optional)
Proposed solution:
PowerShell:
AzProviderRegister -Namespace Microsoft.Insights
Azure CLI:
az provider register --namespace Microsoft.Insights
In this example, AzProviderRegister can be directly mapped to az provider register using a simple function: (lower case everything, separate every word by a space character). The flag -Namespace maps directly to --namespace.
This way you can simplify massively the adoption of PowerShell commands since every Linux-based programmer can now, almost without thinking or checking the documentation, guess the correct PowerShell commands.
What do you think about that?
Best wishes,
John
Beta Was this translation helpful? Give feedback.
All reactions