Share via


Get-AzureResourceGroupGalleryTemplate

Get-AzureResourceGroupGalleryTemplate

Gets resource group templates from the gallery.

Syntax

Parameter Set: Get a single gallery template
Get-AzureResourceGroupGalleryTemplate [-Identity] <String> [-Profile <AzureProfile> ] [ <CommonParameters>]

Parameter Set: List gallery templates
Get-AzureResourceGroupGalleryTemplate [[-Publisher] <String> ] [[-Category] <String> ] [[-ApplicationName] <String> ] [[-AllVersions]] [-Profile <AzureProfile> ] [ <CommonParameters>]

Detailed Description

The Get-AzureResourceGroupGalleryTemplate cmdlet gets resource group templates from the template gallery that Azure hosts. To save a gallery template as a JavaScript Object Notation (JSON) file, use the Save-AzureResourceGroupGalleryTemplate cmdlet.

For more information about resource group templates, see the Test-AzureResourceGroupTemplate cmdlet.

Parameters

-AllVersions

Indicates that this cmdlet gets all versions of the resource group templates that it gets. If you do not specify this parameter, this cmdlet gets only the latest version.

Aliases

none

Required?

false

Position?

5

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-ApplicationName<String>

Specifies the name of an application. This cmdlet gets resource group templates for the application that this parameter specifies.

Aliases

none

Required?

false

Position?

4

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-Category<String>

Specifies a category. This cmdlet gets resource group templates for the category that this parameter specifies.

Aliases

none

Required?

false

Position?

3

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Identity<String>

Specifies the resource group template that this cmdlet gets.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-Profile<AzureProfile>

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Publisher<String>

Specifies a publisher. This cmdlet gets resource group templates for the publisher that this parameter specifies.

Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<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 (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None

    You can pipe input to the cmdlet by property name, but not by value.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • System.Management.Automation.PSCustomObject

    This cmdlet returns resource group templates.

Examples

This command gets all gallery templates in the Azure template gallery and displays the identity and description of each template.

Get-AzureResourceGroupGalleryTemplate

This command gets the WikimediaFoundation.MediaWiki.0.1.0-preview1 gallery template. You can review the template and its properties, such as icons and screenshots.

Get-AzureResourceGroupGalleryTemplate -Identity "WikimediaFoundation.MediaWiki.0.1.0-preview1"

Example 3: Get the category, identity, and summary of the templates

This example displays the CategoryIds property, identity, and summary of each template. The command gets all the resource group templates in the gallery, and then passes them to the ForEach-Object cmdlet by using the pipeline operator. That cmdlet gets each individual template by specifying the Identity property of each template. The command passes the results to the Format-List cmdlet, which formats the output.

Get-AzureResourceGroupGalleryTemplate | Foreach-Object {Get-AzureResourceGroupGalleryTemplate -Identity $_.Identity} | Format-List -Property CategoryIds, Identity, Summary

Save-AzureResourceGroupGalleryTemplate

ForEach-Object

Format-List