Get-AzResourceProvider
Gets a resource provider.
Syntax
ListAvailable (Default)
Get-AzResourceProvider
[-Location <String>]
[-ListAvailable]
[-ApiVersion <String>]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
IndividualProvider
Get-AzResourceProvider
-ProviderNamespace <String[]>
[-Location <String>]
[-ApiVersion <String>]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzResourceProvider cmdlet gets an Azure resource provider.
Examples
Example 1: Get all resource providers registered with the current subscription
Get-AzResourceProvider
ProviderNamespace : Microsoft.AppConfiguration
RegistrationState : Registered
ResourceTypes : {configurationStores, configurationStores/eventGridFilters, checkNameAvailability, locations…}
Locations : {West Central US, Central US, West US, East US…}
ProviderNamespace : Microsoft.KeyVault
RegistrationState : Registered
ResourceTypes : {vaults, vaults/secrets, vaults/accessPolicies, operations…}
Locations : {North Central US, East US, North Europe, West Europe…}
ProviderNamespace : Microsoft.Network
RegistrationState : Registered
ResourceTypes : {virtualNetworks, publicIPAddresses, networkInterfaces, privateEndpoints…}
Locations : {West US, East US, North Europe, West Europe…}
ProviderNamespace : Microsoft.Compute
RegistrationState : Registered
ResourceTypes : {availabilitySets, virtualMachines, virtualMachines/extensions, virtualMachineScaleSets…}
Locations : {East US, East US 2, West US, Central US…}
ProviderNamespace : Microsoft.Security
RegistrationState : Registered
ResourceTypes : {operations, securityStatuses, tasks, regulatoryComplianceStandards…}
Locations : {Central US, East US, West Europe, West Central US…}
ProviderNamespace : Microsoft.ResourceHealth
RegistrationState : Registered
ResourceTypes : {availabilityStatuses, childAvailabilityStatuses, childResources, events…}
Locations : {Australia Southeast}
ProviderNamespace : Microsoft.PolicyInsights
RegistrationState : Registered
ResourceTypes : {policyEvents, policyStates, operations, asyncOperationResults…}
Locations : {}
ProviderNamespace : Microsoft.Storage
RegistrationState : Registered
ResourceTypes : {storageAccounts, operations, locations/asyncoperations, storageAccounts/listAccountSas…}
Locations : {East US, East US 2, West US, West Europe…}
ProviderNamespace : Microsoft.Web
RegistrationState : Registered
ResourceTypes : {publishingUsers, ishostnameavailable, validate, isusernameavailable…}
Locations : {Central US, North Europe, West Europe, Southeast Asia…}
ProviderNamespace : Sendgrid.Email
RegistrationState : Registered
ResourceTypes : {accounts, operations}
Locations : {Australia East, Australia Southeast, Brazil South, Canada Central…}
ProviderNamespace : Microsoft.Authorization
RegistrationState : Registered
ResourceTypes : {roleAssignments, roleDefinitions, classicAdministrators, permissions…}
Locations : {}
...
This command gets all the resource providers from the subscription.
Example 2: Get all resource provider details from the given ProviderNamespace
Get-AzResourceProvider -ProviderNamespace Microsoft.Compute
ProviderNamespace : Microsoft.Compute
RegistrationState : Registered
ResourceTypes : {availabilitySets}
Locations : {East US, East US 2, West US, Central US…}
ProviderNamespace : Microsoft.Compute
RegistrationState : Registered
ResourceTypes : {virtualMachines}
Locations : {East US, East US 2, West US, Central US…}
ProviderNamespace : Microsoft.Compute
RegistrationState : Registered
ResourceTypes : {virtualMachines/extensions}
Locations : {East US, East US 2, West US, Central US…}
ProviderNamespace : Microsoft.Compute
RegistrationState : Registered
ResourceTypes : {virtualMachineScaleSets}
Locations : {East US, East US 2, West US, Central US…}
ProviderNamespace : Microsoft.Compute
RegistrationState : Registered
ResourceTypes : {virtualMachineScaleSets/extensions}
Locations : {East US, East US 2, West US, Central US…}
ProviderNamespace : Microsoft.Compute
RegistrationState : Registered
ResourceTypes : {virtualMachineScaleSets/virtualMachines}
Locations : {East US, East US 2, West US, Central US…}
ProviderNamespace : Microsoft.Compute
RegistrationState : Registered
ResourceTypes : {virtualMachineScaleSets/networkInterfaces}
Locations : {East US, East US 2, West US, Central US…}
...
This command Gets all the resource providers under "Microsoft.Compute".
Example 3: Get all resource provider details from the given ProviderNamespace array
Get-AzResourceProvider -ProviderNamespace Microsoft.Compute,Microsoft.Network
ProviderNamespace : Microsoft.Compute
RegistrationState : Registered
ResourceTypes : {availabilitySets}
Locations : {East US, East US 2, West US, Central US…}
ProviderNamespace : Microsoft.Compute
RegistrationState : Registered
ResourceTypes : {virtualMachines}
Locations : {East US, East US 2, West US, Central US…}
ProviderNamespace : Microsoft.Compute
RegistrationState : Registered
ResourceTypes : {virtualMachines/extensions}
Locations : {East US, East US 2, West US, Central US…}
ProviderNamespace : Microsoft.Compute
RegistrationState : Registered
ResourceTypes : {virtualMachineScaleSets}
Locations : {East US, East US 2, West US, Central US…}
ProviderNamespace : Microsoft.Compute
RegistrationState : Registered
ResourceTypes : {virtualMachineScaleSets/extensions}
Locations : {East US, East US 2, West US, Central US…}
...
ProviderNamespace : Microsoft.Network
RegistrationState : Registered
ResourceTypes : {virtualNetworks}
Locations : {West US, East US, North Europe, West Europe…}
ProviderNamespace : Microsoft.Network
RegistrationState : Registered
ResourceTypes : {publicIPAddresses}
Locations : {West US, East US, North Europe, West Europe…}
ProviderNamespace : Microsoft.Network
RegistrationState : Registered
ResourceTypes : {networkInterfaces}
Locations : {West US, East US, North Europe, West Europe…}
ProviderNamespace : Microsoft.Network
RegistrationState : Registered
ResourceTypes : {privateEndpoints}
Locations : {West US, East US, North Europe, West Europe…}
ProviderNamespace : Microsoft.Network
RegistrationState : Registered
ResourceTypes : {privateEndpointRedirectMaps}
Locations : {West US, East US, North Europe, West Europe…}
ProviderNamespace : Microsoft.Network
RegistrationState : Registered
ResourceTypes : {loadBalancers}
Locations : {West US, East US, North Europe, West Europe…}
ProviderNamespace : Microsoft.Network
RegistrationState : Registered
ResourceTypes : {networkSecurityGroups}
Locations : {West US, East US, North Europe, West Europe…}
...
This command Gets all the resource providers under "Microsoft.Compute" and "Microsoft.Network".
Example 4: Get the default API version for a specific resource type
$crp = Get-AzResourceProvider -ProviderNamespace "Microsoft.Compute"
$crp.ResourceTypes | Where-Object { $_.ResourceTypeName -eq "disks" }
ResourceTypeName : disks
Locations : {Southeast Asia, East US 2, Central US, West Europe…}
ApiVersions : {2024-03-02, 2023-10-02, 2023-04-02, 2023-01-02…}
DefaultApiVersion : 2022-03-02
To get the default API version for a specific resource type, get the resource provider first then filter the resource type by name.
Parameters
-ApiVersion
Specifies the API version that is supported by the resource Provider. You can specify a different version than the default version.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Parameter properties
Type: | IAzureContextContainer |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ListAvailable
Indicates that this operation gets all available resource providers.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ListAvailable
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Location
Specifies the location of the resource provider.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Pre
Indicates that this cmdlet considers pre-release API versions when it automatically determines which version to use.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ProviderNamespace
Specifies the namespace of the resource provider.
Parameter properties
Type: | String[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
IndividualProvider
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.