Working with Azure using the az cli commands is extremely productive and fast – provided you know most of the commands by heart. Soon into your Azure journey you’ll memorise some of the most useful commands very quickly and keep using these, for example az login or az list and so on… right?
Quickly after that, you’ll be sitting in front of your screen and thinking – how can I reduce the typing? or I wish I could just type one short-hand command to do xyz operation….
Some of you will use the CMD/Bash history (arrow up/down) to efficiently navigate between most recently used commands – well – until you have so many of these that you get lost "in the history"…
Problem Statement
If only I could have short-hand scripts to help reduce typing some of the most repetitive az cli commands.
qbitcli to the rescue…
What is "qbitcli"?
qbitcli is a bundle full of useful scripts, covering the following technologies: Azure, Docker, Kubernetes and Helm Charts.
All resources in qbitcli are free, public and constantly updated with new code snippets.
How to use "qbitcli" with Azure
Step 1 – Deploy "qbitcli"
Open CMD, navigate to location where you need the qbitcli resources copied and run the command below. Image always has latest tag and it’s the only tag.
docker create --name qbitcli qbituniverse/qbitcli
docker cp qbitcli:/qbitcli/. qbitcli/
docker rm -fv qbitcli
docker rmi -f qbituniverse/qbitcli:latest
The end result will be a folder structure created as follows:
|- qbitcli
|- az.ps1
|- ...
Step 2 – View all Azure resources with "qbitcli"
az.ps1
Step 3 – Discover more "qbitcli" Flags for Azure
az.ps1 --help
Flags
–view | View all Azure resources. Same as typing az.ps1 on its own. |
Usage
Short-hand to view all resources
az.ps1
Use with a flag
az.ps1 [flag]