Skip to content
3.0 preview2.3.0 stable

These docs describe the preview. Pick the version you run and every page marks what it doesn't have yet. Get the preview →
Maester 2.x docs (archived) →

Sponsor

Invoke-MtAzureRequest

Invoke a REST API request to the Azure Management API.

Invoke-MtAzureRequest [-RelativeUri] <String> [[-Method] <String>] [[-ApiVersion] <Object>]
[[-Filter] <String>] [[-Select] <String>] [[-Payload] <String>] [-Graph] [-ProgressAction <ActionPreference>]
[<CommonParameters>]

This function allows you to make REST API requests to the Azure Management API. It is a wrapper around the Invoke-AzRest function, providing a simplified interface.

Invoke-MtAzureRequest -RelativeUri 'subscriptions'

Graph endpoint such as “users”.

Type: String
Parameter Sets: (All)
Aliases: Path
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

The HTTP method to use. Default is GET.

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: GET
Accept pipeline input: False
Accept wildcard characters: False

The API version to use. Default is 2024-11-01

Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: 2024-11-01
Accept pipeline input: False
Accept wildcard characters: False

Filter parameters to include in the request. E.g. “displayName eq ‘John’”

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Select parameters to include in the request. E.g. “id,displayName”

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

The body payload for POST/PATCH/PUT requests

Type: String
Parameter Sets: (All)
Aliases: Body
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Use Microsoft Graph endpoint. Defaults to Azure Resource Manager, if enabled requests will go to Microsoft Graph

Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by Write-Progress.

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

https://maester.dev/docs/commands/Invoke-MtAzureRequest