Invoke-MtAzureResourceGraphRequest
SYNOPSIS
Section titled “SYNOPSIS”Invoke a query request to the Azure Resource Graph.
SYNTAX
Section titled “SYNTAX”Invoke-MtAzureResourceGraphRequest [-Query] <String> [[-ApiVersion] <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]DESCRIPTION
Section titled “DESCRIPTION”This function allows you to query resources across Azure subscriptions using Azure Resource Graph. It provides a simplified interface for resource discovery and exploration.
EXAMPLES
Section titled “EXAMPLES”EXAMPLE 1
Section titled “EXAMPLE 1”Invoke-MtAzureResourceGraphRequest -Query "Resources | where type =~ 'Microsoft.Compute/virtualMachines'"Lists all Azure virtual machines
EXAMPLE 2
Section titled “EXAMPLE 2”Invoke-MtAzureResourceGraphRequest -Query "ResourceContainers | where type=='microsoft.resources/subscriptions'"Lists all Azure subscriptions
PARAMETERS
Section titled “PARAMETERS”-Query
Section titled “-Query”The Resource Graph query to execute using KQL (Kusto Query Language)
Type: StringParameter Sets: (All)Aliases:
Required: TruePosition: 1Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False-ApiVersion
Section titled “-ApiVersion”The API version to use for the Azure Resource Graph REST API
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 2Default value: 2021-03-01Accept pipeline input: FalseAccept wildcard characters: False-ProgressAction
Section titled “-ProgressAction”Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by Write-Progress.
Type: ActionPreferenceParameter Sets: (All)Aliases: proga
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseCommonParameters
Section titled “CommonParameters”This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
Section titled “INPUTS”OUTPUTS
Section titled “OUTPUTS”RELATED LINKS
Section titled “RELATED LINKS”https://maester.dev/docs/commands/Invoke-MtAzureResourceGraphRequest