Skip to content

Category Filtering

Overview

The -Category parameter allows you to limit an AZSC inventory run to specific Azure resource categories. This is especially useful when you need a targeted scan rather than a full-tenant inventory.

TIP

Category filtering can reduce run time by 70-90% for large tenants when you only need data from a specific service area.

Supported Categories

-Category ValueAzure Portal LabelKey Resource Types
AIAI + Machine LearningCognitive Services, OpenAI, ML Workspaces, Bot Services, AI Foundry
AnalyticsAnalyticsSynapse, Databricks, Data Factory, Event Hub, Purview
ComputeComputeVirtual Machines, VMSS, Managed Disks, AVD
ContainersContainersAKS, ARO, Container Apps, Container Registry
DatabasesDatabasesSQL Server, PostgreSQL flexible server, MySQL, Cosmos DB, Redis Cache
DevOpsDevOpsChaos Studio, Dev Box, Dev centers, DevTest Labs, Load Testing, App Configuration
GeneralGeneralSupport tickets, reservations and recommendations, VM quotas
HybridHybrid + multicloudArc Servers, Arc Kubernetes, Azure Local Clusters, Arc Gateways
IdentityIdentityUsers, Groups, App Registrations, PIM, Conditional Access
IntegrationIntegrationAPI Management, Service Bus, Event Hubs, Logic Apps
IoTInternet of ThingsIoT Hub, IoT DPS
ManagementManagement and governanceSubscriptions, Policy, Backup, Automation, Recovery Vault
MigrationMigrationAzure Migrate projects/assessments, Database Migration Service, Data Box, Azure Stack Edge
MonitorMonitorApp Insights, DCRs, Action Groups, Alert Rules, Log Analytics
NetworkingNetworkingVNets, NSGs, Load Balancers, VPN Gateways, Azure Firewall, Front Door
SecuritySecurityDefender Assessments, Alerts, Secure Score, Key Vault
StorageStorageStorage Accounts, Azure NetApp Files
WebWeb & MobileApp Service Plans, App Services, Function Apps

Compute/CloudServices (classic/ASM cloud services) and Storage/DataLakeStoreGen1 were retired 2026-07-31 — both targeted resource types Azure no longer has. Databases/POSTGRE (PostgreSQL Single Server) was retired the same day; only the flexible-server type remains, and it is already covered above.

Alias Support

Long-form names displayed in the Azure portal are automatically normalized to their short equivalents:

powershell
# These are equivalent:
Invoke-AzureScout -TenantID $tid -Category 'IoT'
Invoke-AzureScout -TenantID $tid -Category 'Internet of Things'

Invoke-AzureScout -TenantID $tid -Category 'Monitor'
Invoke-AzureScout -TenantID $tid -Category 'Monitoring'

Invoke-AzureScout -TenantID $tid -Category 'Management'
Invoke-AzureScout -TenantID $tid -Category 'Management and governance'

Usage Examples

Single Category

powershell
# Inventory only Virtual Machines and related Compute resources
Invoke-AzureScout -TenantID <tenant-id> -Category Compute

Multiple Categories

powershell
# Inventory Compute and Networking together (common combination for network topology reviews)
Invoke-AzureScout -TenantID <tenant-id> -Category Compute,Networking

# Security audit: inventory Security + Identity
Invoke-AzureScout -TenantID <tenant-id> -Category Security,Identity

# Data platform review
Invoke-AzureScout -TenantID <tenant-id> -Category Databases,Analytics,AI

Combine with Output Format

powershell
# Targeted scan with JSON output only (fastest)
Invoke-AzureScout -TenantID <tenant-id> -Category Networking -OutputFormat Json

# Generate the self-contained React report for Compute only
Invoke-AzureScout -TenantID <tenant-id> -Category Compute -OutputFormat React

Full Inventory (Default)

powershell
# -Category defaults to 'All' — all categories included
Invoke-AzureScout -TenantID <tenant-id>

# Explicit equivalent
Invoke-AzureScout -TenantID <tenant-id> -Category All

How Category Filtering Works

INFO

Category filtering is applied at the module discovery stage, before any Azure API calls are made. Only the selected category folders are loaded, which means Resource Graph queries are also restricted to the resource types defined in those modules.

Execution flow with -Category Compute:

mermaid
graph TD
    A[Invoke-AzureScout] --> B{Category specified?}
    B -- Yes --> C[Normalize aliases]
    C --> D[Load only Compute/*.ps1 modules]
    D --> E[Execute Processing blocks]
    E --> F[Azure Resource Graph query - Compute types only]
    F --> G[Execute Reporting blocks]
    G --> H[Write React report / JSON data]
    B -- No / All --> I[Load ALL category modules]
    I --> E

Adding New Categories

To add a new category to AZSC:

  1. Create a folder under manifests/collectors/<CategoryName>/
  2. Add the folder name to the [ValidateSet] for -Category in Invoke-AzureScout.ps1
  3. Optionally add alias entries to $_categoryAliasMap for common name variants
  4. Update Category Structure with the new mapping
  5. Create one or more .ps1 module files using the module template in manifests/collectors/

See Also

Released under the MIT License.