Skip to main content
Advanced Search
Search Terms
Content Type

Exact Matches
Tag Searches
Date Options
Updated after
Updated before
Created after
Created before

Search Results

502 total results found

Performance

Windows - One Liners

Get computer name of vms in a VMSS

Azure - Cheatsheet VMSS

az vmss list-instances -n $VMSS_NAME -g $RESOURCE_GROUP | jq '.[].osProfile.computerName'

File System

Windows - One Liners

Run command in VM in a VMSS

Azure - Cheatsheet 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

Windows - Scripts

Get all instance metadata

Azure - Cheatsheet Metadata Service

curl -s -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2020-09-01"  

Updates

Windows - One Liners

Get access token

Azure - Cheatsheet Metadata Service

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

Windows - Scripts

Request storage account token

Azure - Cheatsheet Metadata Service

# 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

Windows - One Liners

Get AKS node IP

Azure - Cheatsheet Metadata Service

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

Windows - Scripts

Create new role assignment

Azure - Cheatsheet Roles

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

M365 - Scripts

Show registered features in a table format

Azure - Cheatsheet Features

az feature list -o table  

Email Management

M365 - Scripts

Find features associated w/ ContainerService

Azure - Cheatsheet Features

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/