Difference between revisions of "Az cli"
Jump to navigation
Jump to search
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | # install | ||
+ | https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt | ||
+ | ``` | ||
+ | curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash | ||
+ | ``` | ||
+ | |||
+ | https://docs.microsoft.com/en-us/cli/azure/use-cli-effectively | ||
+ | |||
+ | |||
az disk list --resource-group <my group> --out table | az disk list --resource-group <my group> --out table | ||
https://docs.microsoft.com/en-us/azure/virtual-machines/disks-incremental-snapshots?tabs=azure-cli | https://docs.microsoft.com/en-us/azure/virtual-machines/disks-incremental-snapshots?tabs=azure-cli | ||
+ | |||
+ | # Disk | ||
+ | - https://stackoverflow.com/questions/67578747/will-i-lose-the-data-from-my-disk-if-i-switch-from-ssd-to-hdd-in-a-azure-vm | ||
+ | |||
+ | |||
+ | One Liners | ||
+ | ``` | ||
+ | az vm user update -u myuser -p mypass -n myvm -g $RG | ||
+ | az vm user update -u username --ssh-key-value "$(< ~/.ssh/id_rsa.pub)" -n MyVm -g MyResourceGroup | ||
+ | ``` | ||
+ | - https://docs.microsoft.com/en-us/cli/azure/vm/user?view=azure-cli-latest#az-vm-user-update |
Latest revision as of 20:10, 16 May 2023
install
https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
https://docs.microsoft.com/en-us/cli/azure/use-cli-effectively
az disk list --resource-group
https://docs.microsoft.com/en-us/azure/virtual-machines/disks-incremental-snapshots?tabs=azure-cli
Disk
One Liners
az vm user update -u myuser -p mypass -n myvm -g $RG az vm user update -u username --ssh-key-value "$(< ~/.ssh/id_rsa.pub)" -n MyVm -g MyResourceGroup