Advanced Search
Search Results
502 total results found
Performance
Get computer name of vms in a VMSS
az vmss list-instances -n $VMSS_NAME -g $RESOURCE_GROUP | jq '.[].osProfile.computerName'
File System
Run command in VM in a VMSS
This will run commands in the instance with an id of 0. See the above commands for how to get the id that corresponds to the instance you want to work with. az vmss run-command invoke -g $RESOURCE_GROUP -n $VMSS_NAME --command-id RunShellScript --instance-id ...
Updates
Get all instance metadata
curl -s -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2020-09-01"
Updates
Get access token
curl -s -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com" Resources:Official docsAccessible endpointsGet access token
System
Request storage account token
# Get OAuth Token TOKEN=$(curl -s "http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com" -H Metadata:true | jq -r '.access_token') # Get subscription id SUB=$(curl -s -H Metadata:true --noproxy...
System
Get AKS node IP
curl -s -H Metadata:true "http://169.254.169.254/metadata/instance?api-version=2017-08-01" | jq -r .network.interface[].ipv4.ipAddress[].privateIpAddress Resource: https://itnext.io/how-a-naughty-docker-image-on-aks-could-give-an-attacker-access-to-your-azure...
Windows Roles
Create new role assignment
This will try to assign the assignee the owner role: az role assignment create --assignee <user or service principal> --role "owner" Resource: https://www.xmcyber.com/privilege-escalation-and-lateral-movement-on-azure-part-1/
Distribution Lists
Show registered features in a table format
az feature list -o table
Email Management
Find features associated w/ ContainerService
az feature list -o table --query "[?contains(name, 'Microsoft.ContainerService')].{Name:name,State:properties.state}" Resource: https://heranonazure.wordpress.com/2019/09/02/secure-api-server-using-authorized-ip-address-ranges/