Azure az CLI

az vm list -d \
  --query "[].{resource:resourceGroup, name: name, vmSize:hardwareProfile.vmSize, OS:storageProfile.imageReference.offer }" \
  -o table

az vm list -d --query "[?starts_with(name,'dv5')]" -o table

az vm list-ip-addresses --query "[?starts_with(virtualMachine.name, 'dv5')].{name: virtualMachine.name, pri:  virtualMachine.network.privateIpAddresses[0], pub: virtualMachine.network.publicIpAddresses[0].ipAddress}"   -o table

az vm list --query "[?starts_with(name, 'dv5')].{resource:resourceGroup, name: name, loc: location, ppg:proximityPlacementGroup.id }"   -o table

az vm list -d --query "[?name=='dv5-1']" -o table az storage account list
--query "[].{name:name,location:location}" -o table az vm list-ip-addresses -o table az vm list-usage -l eastasia -o table

curl -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2021-02-01" | jq

less ping.txt | awk -F 'ms' '{print $1}' | awk -F '=' '$4 > 4' | sort -k 4 -t =

curl -o /dev/null -s -w nslookup::%{time_namelookup}::connect::%{time_connect}::start_transfer::%{time_starttransfer}::total::%{time_total}::download_speed::%{speed_download}::pretransfer::%{time_pretransfer}"\n" http://cdn.weiheng.ink/cat1.jpg

curl https://ipapi.co/8.8.8.8/json

curl http://api.ipstack.com/8.8.8.8?access_key=f17b8680a4f832c022063d585c0a1f9f

curl cip.cc
curl ifconfig.cc
curl ifconfig.co

az vmss nic list -g xxx --vmss-name xxx | jq '.[] | "\(.name),\(.ipConfigurations[].privateIpAddress)"'

jq -r '.[] | "\(.name),\(.hardwareProfile.vmSize),\(.location),\(.resourceGroup),\(.zones[0])"' vmlist.json > vminfo.csv

jq '.[]  | select(.zones[0] == "1")' vmlist-wh-01.json | jq .name

base64 /dev/urandom | head -c 1000000 > file1.txt
posted @ 2021-09-20 11:33  衡子  阅读(118)  评论(0编辑  收藏  举报