// Azure Sysadmin Field Guide · Read-Only Recon Edition

Azure Field Guide

Commands, concepts, mnemonics, Intune recon — everything to map a new environment without breaking anything.

Learning Your Environment

// read-only recon · week 1 playbook
The rule: First week — read everything, change nothing. Every command here is a list/show/get. No create, delete, update, assign, or set. listshowget createdeleteassign
Day 1
Structure
  • List subscriptions
  • Management groups
  • Resource group naming
  • Tags & ownership
Day 2
Networking
  • VNETs & address spaces
  • Peerings & topology
  • NSG rules
  • Private endpoints
Day 3
Compute
  • VM inventory
  • VMSS / scale sets
  • Extensions baseline
  • Orphaned resources
Day 4
Identity
  • RBAC assignments
  • Who has Owner?
  • Service principals
  • Managed identities
Day 5
Monitoring
  • Log Analytics WS
  • Alert rules
  • Diagnostic settings
  • Policy assignments
Questions to Ask the Team (Can't Get from CLI)
What broke last month and why? — more valuable than any doc.
What's the deployment process? — IaC pipeline, manual, or someone's script?
Is there a change management process? — or do people just make changes?
Where are the runbooks? — on-call rotation, escalation path.
What monitoring alerts are active? — and who actually gets paged?
Any known technical debt? — every environment has skeletons.
What Naming Conventions Tell You
prod-eastus-web-vm-01 → mature environment, thought-through naming.
MyVM3 / TestServer / johns-vm → click-ops, no governance, changes are riskier.
No tags on resources → no cost tracking, no ownership — audit this fast.
Everything in one resource group → no environment separation, high blast radius.

CLI Commands

// all read-only · safe to run
Account & Structure READ-ONLY
# Who am I logged in as
az account show

# All subscriptions I have access to
az account list --output table

# Switch to a specific subscription
az account set --subscription "<subscription-id-or-name>"

# Management group hierarchy
az account management-group list --output table

# All resource groups — name, location, tags
az group list --query "[].{Name:name, Location:location, Tags:tags}" -o table

# All resources in a resource group
az resource list -g <resource-group> --query "[].{Name:name, Type:type}" -o table
    
Networking READ-ONLY
# All VNETs and address spaces
az network vnet list --query "[].{Name:name, RG:resourceGroup, Space:addressSpace.addressPrefixes}" -o table

# Subnets in a VNET
az network vnet subnet list --vnet-name <vnet> -g <rg> --query "[].{Name:name, Prefix:addressPrefix}" -o table

# VNET peerings (how VNETs talk to each other)
az network vnet peering list --vnet-name <vnet> -g <rg> -o table

# All NSGs
az network nsg list -o table

# NSG rules for a specific NSG
az network nsg show -n <nsg-name> -g <rg> --query "securityRules[]" -o table

# Private endpoints (signals locked-down architecture)
az network private-endpoint list --query "[].{Name:name, RG:resourceGroup, Connection:privateLinkServiceConnections[0].name}" -o table

# VPN Gateways (on-prem connectivity)
az network vnet-gateway list -o table

# Public IPs (anything internet-facing)
az network public-ip list --query "[].{Name:name, IP:ipAddress, Associated:ipConfiguration.id}" -o table
    
Compute — VMs & Scale Sets READ-ONLY
# Full VM inventory — name, size, OS, state, RG
az vm list --show-details --query "[].{Name:name, RG:resourceGroup, Size:hardwareProfile.vmSize, OS:storageProfile.osDisk.osType, State:powerState}" -o table

# VMs with no tags (unowned resources)
az vm list --query "[?tags==null].{Name:name, RG:resourceGroup}" -o table

# Extensions installed on a specific VM
az vm extension list --vm-name <vm-name> -g <rg> -o table

# All VM scale sets
az vmss list --query "[].{Name:name, RG:resourceGroup, Capacity:sku.capacity, Tier:sku.tier}" -o table

# Stopped/deallocated VMs (cost waste candidates)
az vm list --show-details --query "[?powerState=='VM deallocated'].{Name:name, RG:resourceGroup}" -o table

# Export full VM list to JSON for audit
az vm list --show-details -o json > vm-audit.json
    
RBAC & Identity READ-ONLY
# My own role assignments
az role assignment list --assignee <your-upn@company.com> --all -o table

# Everyone with Owner at subscription scope (should be 2-3 max)
az role assignment list --role Owner --scope /subscriptions/<sub-id> -o table

# All role assignments — full audit
az role assignment list --all --query "[].{Principal:principalName, Type:principalType, Role:roleDefinitionName, Scope:scope}" -o table

# Role assignments for a specific resource group
az role assignment list -g <resource-group> --query "[].{Principal:principalName, Role:roleDefinitionName}" -o table

# All role definitions (built-in + custom)
az role definition list --query "[].{Name:roleName, Description:description}" -o table

# Custom roles only
az role definition list --custom-role-only true --query "[].{Name:roleName, Description:description}" -o table

# Full permissions of a specific role
az role definition list --name "Virtual Machine Contributor" --query "[].permissions[].actions[]" -o tsv

# Service principals (app identities)
az ad sp list --all --query "[].{Name:displayName, AppId:appId, Enabled:accountEnabled}" -o table

# Managed identities
az identity list --query "[].{Name:name, RG:resourceGroup, Type:type}" -o table

# Export RBAC audit to JSON
az role assignment list --all --query "[].{Principal:principalName, Type:principalType, Role:roleDefinitionName, Scope:scope}" -o json > rbac-audit.json
    
Monitoring & Logs READ-ONLY
# Log Analytics workspaces
az monitor log-analytics workspace list --query "[].{Name:name, RG:resourceGroup, Location:location}" -o table

# Alert rules
az monitor alert list -o table

# Activity log — recent changes in subscription
az monitor activity-log list --max-events 50 --query "[].{Time:eventTimestamp, Caller:caller, Operation:operationName.localizedValue, Status:status.value}" -o table

# Diagnostic settings on a resource
az monitor diagnostic-settings list --resource <resource-id> -o table

# Azure Policy assignments
az policy assignment list --query "[].{Name:name, Policy:policyDefinitionId, Scope:scope}" -o table

# Policy compliance state
az policy state list --query "[?complianceState=='NonCompliant'].{Resource:resourceId, Policy:policyDefinitionName}" -o table
    
Key Vault & Storage READ-ONLY
# List all Key Vaults
az keyvault list --query "[].{Name:name, RG:resourceGroup, Location:location}" -o table

# Key Vault access policies (who has access)
az keyvault show -n <vault-name> --query "properties.accessPolicies[].{ObjectId:objectId, Keys:permissions.keys, Secrets:permissions.secrets}" -o table

# List secret names (not values — you can't read values with Reader)
az keyvault secret list --vault-name <vault-name> --query "[].{Name:name, Enabled:attributes.enabled, Expires:attributes.expires}" -o table

# All storage accounts
az storage account list --query "[].{Name:name, RG:resourceGroup, Kind:kind, Tier:sku.tier, PublicAccess:allowBlobPublicAccess}" -o table

# Storage accounts with public blob access (security risk)
az storage account list --query "[?allowBlobPublicAccess==true].{Name:name, RG:resourceGroup}" -o table
    
AuthorizationFailed error? That just means your role doesn't cover that scope — Azure blocks it, no damage done. Common with az ad sp list --all which needs Entra Directory Reader, separate from Azure subscription Reader.

Core Concepts

// reference while learning
Azure Resource Hierarchy
Everything in Azure lives in this hierarchy. RBAC and Policy assigned at any level inherit downward.
🏢 Management Group — groups multiple subscriptions; top-level governance
📋 Subscription — billing boundary; usually separated by env or business unit
📁 Resource Group — logical container; lifecycle boundary (delete RG = delete everything in it)
🖥️ Resource — actual thing: VM, VNET, Storage Account, Key Vault, etc.
Key insight: A role assigned at Subscription scope applies to all Resource Groups and Resources inside it. A role at Resource Group scope only applies within that RG. This is how you grant "view everything" vs "manage only this one app's resources."
RBAC — Role-Based Access Control
What it is: The system controlling who can do what to which Azure resources.

Three components of every assignment:
  Security Principal — who: user, group, service principal, or managed identity
  Role Definition — what: a collection of allowed/denied actions
  Scope — where: management group, subscription, resource group, or resource

Most common built-in roles:
RoleWhat it can doTypical use
OwnerEverything, including grant access to others2-3 admins max at sub scope
ContributorCreate/manage all resources, cannot grant accessDevOps teams, automation
ReaderView everything, change nothingAuditors, new hires recon
User Access AdministratorManage access only, cannot touch resourcesIAM team delegation
VM ContributorManage VMs, not the VNET or storage they're onOps teams
Network ContributorManage networking resourcesNetwork team
Key Vault ReaderView vault metadata, not secret valuesAuditors
Entra roles ≠ Azure resource roles. "Global Reader" in Entra ID controls reading directory objects (users, groups, apps). "Reader" in Azure controls reading Azure resources (VMs, storage, etc.). They're separate systems that overlap but don't replace each other.
Entra ID (formerly Azure Active Directory)
What it is: Microsoft's cloud identity platform. Every person, app, or service that authenticates to Azure goes through Entra ID.

Key objects you'll deal with:
ObjectWhat it isWhat to watch for
UserA person's identityGuest users with high permissions, stale accounts
GroupCollection of users; assign roles to group not individualsNested groups, old groups with no members
Service PrincipalIdentity for an application or automationExpired credentials, overprivileged SPs, orphaned ones
Managed IdentityAuto-managed SP; no password to rotatePreferred over service principals — use this when possible
App RegistrationRegisters an app in the tenant so it can authenticateOld apps nobody owns, excessive API permissions
Conditional AccessRules that control when/how auth succeedsMFA requirements, compliant device policies
Managed Identity vs Service Principal: A Service Principal needs a secret or certificate that expires and must be rotated. A Managed Identity is handled entirely by Azure — no password, no rotation headache. If you see apps still using SP passwords, that's technical debt worth flagging.
Networking — The Skeleton
ConceptWhat it isKey fact
VNETVirtual network — isolated address space in AzureVMs in the same VNET can talk by default
SubnetSubdivision of a VNET; NSGs attach hereSeparate subnets = separate blast radius
NSGNetwork Security Group — stateful firewall rulesApplied at subnet or NIC level; last-rule-wins
VNET PeeringConnects two VNETs directlyNot transitive — A↔B, B↔C does NOT mean A↔C
Private EndpointBrings a PaaS service (like Storage) into your VNETTraffic never leaves Azure backbone
VPN GatewayEncrypted tunnel to on-premisesSite-to-site or point-to-site
ExpressRouteDedicated private connection to Azure (not internet)Faster, more reliable, more expensive than VPN
Hub-SpokeTopology: central hub VNET with spoke VNETs peered to itShared services (firewall, DNS) live in hub
UDRUser-Defined Route — force traffic through a specific pathUsed to route all traffic through a firewall
Monitoring Stack
ServiceWhat it doesThink of it as
Azure MonitorUmbrella for all monitoring dataThe platform everything reports to
Log AnalyticsCentralized log storage; query with KQLYour log database + query engine
KQLKusto Query Language — query logsSQL but for logs; quick to learn
MetricsNumeric time-series data (CPU %, memory, etc.)Grafana-style dashboards
AlertsRules that fire when a metric/log crosses a thresholdPagerDuty equivalent
Diagnostic SettingsConfigure what a resource sends to Log AnalyticsPer-resource logging toggle
Activity LogAudit trail of every control-plane change"Who changed what and when"
Azure PolicyRules enforced on resources (deny, audit, auto-fix)Governance guardrails

Mnemonics

// memory hooks for Azure concepts
"Many Silly Rabbits Run"
// Azure Resource Hierarchy — top to bottom
M Management Groups Top-level governance containers. Apply policy & RBAC here to cascade everywhere below.
S Subscriptions Billing & isolation boundary. Usually split by env (prod/dev) or business unit.
R Resource Groups Logical bucket for related resources. Delete the group = delete everything in it.
R Resources The actual stuff: VMs, VNETs, Storage Accounts, Key Vaults, etc.
"Pretty Smart Sysadmins"
// The 3 parts of every RBAC assignment
P Principal Who — user, group, service principal, or managed identity.
S Scope Where — management group, subscription, resource group, or resource.
S Set (Role Definition) What — the collection of allowed/denied actions. Owner, Contributor, Reader, or custom.
"Very Spicy Noodles Perfectly Verify Everything"
// Core networking objects — recon order
V VNETs The address spaces — what IP ranges exist and where.
S Subnets How each VNET is divided — workloads live in subnets.
N NSGs The firewall rules — what traffic is allowed/blocked.
P Peerings How VNETs connect to each other. Not transitive.
V VPN/ExpressRoute On-prem connectivity. VPN = internet tunnel. ExpressRoute = dedicated line.
E Endpoints (Private) PaaS services pulled inside the VNET. Sign of mature security posture.
"Good Sysadmins Make Apps"
// Entra ID identity object types
G Groups Assign roles to groups, not individuals. Easier to manage at scale.
S Service Principals App identity with a password or cert. Needs manual rotation. Old pattern.
M Managed Identities Auto-managed app identity. No password to rotate. Modern, preferred pattern.
A App Registrations Registers an external app with the tenant so it can authenticate via OAuth/OIDC.
"All Logs Keep Metrics Alerting Daily"
// Azure Monitor stack — what feeds what
A Azure Monitor The umbrella platform everything flows into.
L Log Analytics The log database. Everything queries through here.
K KQL The query language. Like SQL for logs — learn this early.
M Metrics Numeric time-series. CPU, memory, disk — the dashboard numbers.
A Alerts Rules that page/email/webhook when thresholds are crossed.
D Diagnostic Settings Per-resource toggle: what gets sent to Log Analytics.
"Low Numbers Win, High Numbers Lose"
// NSG rule priority — lower number = higher priority
NSG rules are numbered 100–4096. Rule 100 beats rule 200 — lower number wins. Azure processes rules from lowest to highest and stops at the first match. The default rules at 65000+ (AllowVnetInBound, DenyAllInbound) are always there at the bottom as a backstop. When you see a rule at 100 that allows something and a rule at 200 that denies it — the allow wins.
"Peering is NOT a Chain"
// VNET peering is not transitive
If VNET-A is peered to VNET-B, and VNET-B is peered to VNET-C — VNET-A CANNOT talk to VNET-C. Peering is a direct 1-to-1 link, not a network. To connect A to C, you need an explicit peering between A and C, or route through a hub with a firewall/NVA (Network Virtual Appliance). This trips up most people new to Azure networking.

Intune — Learning Your MDM Environment

// device management recon
What Intune Is
Microsoft Intune is the MDM (Mobile Device Management) and MAM (Mobile Application Management) platform in Microsoft 365. It controls what devices can access company resources, what apps are deployed, and enforces security baselines.

Think of it as Group Policy for the cloud — except it works on Windows, macOS, iOS, Android, and Linux without requiring domain join.
📱
Device
Win/Mac/iOS/Android
📋
Enrollment
Joins Intune via Entra ID
⚙️
Config Profiles
Settings pushed to device
Compliance
Pass/Fail policies
🔐
Conditional Access
Compliant = gets in
What to Read First in Intune (Intune Portal → intune.microsoft.com)
1. Devices → All Devices
  → How many devices are enrolled? Windows vs Mac vs mobile?
  → Are there stale devices (last check-in months ago)?
  → Compliance status — what % are compliant vs non-compliant?

2. Devices → Configuration Profiles
  → What settings are being pushed? (Wi-Fi, VPN, certificates, BitLocker)
  → Are profiles assigned to groups or all devices?
  → Any profiles with errors or assignment failures?

3. Devices → Compliance Policies
  → What are the pass/fail rules? (min OS version, BitLocker required, etc.)
  → What happens on non-compliance? (block access, notify, grace period?)
  → Are compliance policies linked to Conditional Access?

4. Apps → All Apps
  → What apps are deployed via Intune?
  → Required vs Available — required installs automatically, available is self-service
  → Any apps with high failure rates?

5. Endpoint Security → Security Baselines
  → Are Microsoft Security Baselines applied? (pre-built hardened settings)
  → Defender for Endpoint integration active?
  → Firewall and Antivirus profiles deployed?

6. Tenant Administration → Enrollment
  → How are devices enrolled? (Autopilot, BYOD, manual, bulk?)
  → Is Windows Autopilot configured? (means new laptops self-configure out of box)
  → Enrollment restrictions — who can enroll, what device types are allowed?
Key Intune Concepts
ConceptWhat it isWhat to check
EnrollmentThe process of registering a device with IntuneHow it's triggered; Autopilot vs manual vs BYOD
Configuration ProfileSettings pushed to a device (like GPO)Assignment groups, success/failure rate
Compliance PolicyRules a device must meet to be "compliant"What triggers non-compliance, grace period length
Conditional AccessEntra ID gate — compliant device = access grantedWhich apps require compliant device, which don't
AutopilotZero-touch Windows provisioning OOBIs it set up? What profile do new machines get?
Required AppPushed automatically to assigned devicesDeployment failure rate per app
Available AppUser can install from Company PortalSelf-service catalog of approved software
Security BaselinePre-built hardened settings from MicrosoftWhich baseline version, what's overridden
Hybrid JoinDevice is both domain-joined AND Entra-joinedCommon in enterprise — means legacy AD + modern cloud
Entra JoinedDevice joined only to Entra ID (cloud-only)Modern setup; no on-prem AD dependency
Intune via Microsoft Graph CLI READ-ONLY
Intune doesn't have a full az CLI. Use Microsoft Graph CLI (mgc) or PowerShell.
# Install Graph CLI (one-time)
dotnet tool install --global Microsoft.Graph.Cli

# Or use PowerShell module
Install-Module Microsoft.Graph -Scope CurrentUser
Connect-MgGraph -Scopes "DeviceManagementManagedDevices.Read.All"

# List all managed devices
Get-MgDeviceManagementManagedDevice -All |
  Select-Object DeviceName, OperatingSystem, ComplianceState, LastSyncDateTime

# Non-compliant devices
Get-MgDeviceManagementManagedDevice -Filter "complianceState eq 'noncompliant'" |
  Select-Object DeviceName, UserDisplayName, LastSyncDateTime

# List configuration profiles
Get-MgDeviceManagementDeviceConfiguration -All |
  Select-Object DisplayName, OdataType, LastModifiedDateTime

# List compliance policies
Get-MgDeviceManagementDeviceCompliancePolicy -All |
  Select-Object DisplayName, OdataType

# List deployed apps
Get-MgDeviceAppManagementMobileApp -All |
  Select-Object DisplayName, OdataType, PublishingState

# Devices that haven't checked in for 30+ days (stale)
$cutoff = (Get-Date).AddDays(-30)
Get-MgDeviceManagementManagedDevice -All |
  Where-Object { $_.LastSyncDateTime -lt $cutoff } |
  Select-Object DeviceName, UserDisplayName, LastSyncDateTime
    
"Every Compliant Computer Accesses Safely"
// The Intune flow in order
E Enrollment Device registers with Intune (manual, Autopilot, BYOD).
C Configuration Profiles Settings pushed to device — Wi-Fi, VPN, certs, BitLocker, etc.
C Compliance Policies Pass/fail check — is the device meeting security requirements?
A App Deployment Required apps pushed automatically; available apps in Company Portal.
S Security + Conditional Access Compliant device = access granted. Non-compliant = blocked from resources.