Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Get-AzureResourceGroupGalleryTemplate

Get-AzureResourceGroupGalleryTemplate

microsoft.azure.commands.resources.dll

Synopsis

Gets resource group templates in the gallery

Syntax

Get-AzureResourceGroupGalleryTemplate [-Publisher] [-Category] [-ApplicationName] [-AllVersions] [<CommonParameters>]

Get-AzureResourceGroupGalleryTemplate [-Identity] [<CommonParameters>]

Detailed Description

The Get-AzureResourceGroupGalleryTemplate cmdlet gets resource group gallery templates from the template gallery that Azure hosts. To save a gallery template as a JSON file, use the Save-AzureResourceGroupGalleryTemplate cmdlet.A resource group template is a JSON string that defines a resource group for a complex entity, such as a web portal, a blog, a photo gallery, a commerce site, or a wiki. The template defines the resources that are typically needed for the entity, such as web sites, database servers, databases and storage accounts, and includes parameters for user-defined values, such as the names and properties of the resources. To create a resource group with a template, just identify the template and provide values for its parameters.You can create your own templates or use the Get-AzureResourceGroupGalleryTemplate get a template from the template gallery that Azure hosts. You can also create templates by editing the gallery templates. If you create or edit a template, be sure to use the Test-AzureResourceGroupTemplate cmdlet to verify that your template and its parameters are valid.To create a resource group with a custom or gallery template, use the New-AzureResourceGroup or New-AzureResourceGroupDeployment cmdlets.By default the cmdlet gets only the latest version of the template. To get all versions, use the -AllVersions parameter flag.

Parameters

-Publisher <String>

Gets only gallery templates from the specified publisher. Enter one publisher name. Wildcards are not permitted. This parameter is optional. By default, Get-AzureResourceGroupGalleryTemplate gets all gallery templates.

Aliases

None

Required?

false

Position

1

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Category <String>

Gets only gallery templates in the specified category. Wildcards are not permitted. You can specify only one category in each command. This parameter is optional. By default, Get-AzureResourceGroupGalleryTemplate gets all gallery templates.

Aliases

None

Required?

false

Position

2

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-ApplicationName <String>

Aliases

None

Required?

false

Position

3

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-AllVersions <SwitchParameter>

If specified, the cmdlet will return all versions of matching templates. By default only the latest version is returned.

Aliases

None

Required?

false

Position

4

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Identity <String>

Gets the gallery template with the specified Identity value. Wildcards are not permitted. You can specify only one Identity in each command.To find the Identity of a gallery template, run Get-AzureResourceGroupGalleryTemplate without parameters.

Aliases

None

Required?

true

Position

0

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

Input Type

None

Return Type

System.Management.Automation.PSCustomObject

Notes

The Get-AzureResourceGroupGalleryTemplate cmdlet is included in the Azure Resource Manager module beginning in module version 0.8.0.

Examples

-------------------------- Example 1: Get all gallery templates --------------------------

This command gets all gallery templates in the Azure template gallery and displays the Identity and Description of each gallery template in a list. The list lets you browse through the templates and select the ones that meet your needs.

PS C:\>Get-AzureResourceGroupGalleryTemplate
                       
Publisher                 Identity---------                 --------Acquiacom                 Acquiacom.AcquiaDrupal7MySQL.0.1.0-preview1Acquiacom                 Acquiacom.AcquiaDrupal7SQL.0.1.0-preview1Avensoft                  Avensoft.nService.0.1.0-preview1BlogEngineNET             BlogEngineNET.BlogEngineNET.0.1.0-preview1Brandoo                   Brandoo.BrandooWordPressMSSQLorAzureSQL.0.1.0-preview1bugnetproject             bugnetproject.BugNET.0.1.0-preview1CakeSoftwareFoundation    CakeSoftwareFoundation.CakePHP.0.1.0-preview1CommerceGuys              CommerceGuys.DrupalCommerceKickstartMySQL.0.1.0-preview1...

-------------------------- Example 2: Get a gallery template by its identity --------------------------

This command uses the Get-AzureResourceGroupGalleryTemplate cmdlet to get the WikimediaFoundation.MediaWiki.0.1.0-preview1 gallery template. You can review the gallery template and its properties, such as icons and screenshots.

PS C:\> PS C:\ps-test> Get-AzureResourceGroupGalleryTemplate -Identity WikimediaFoundation.MediaWiki.0.1.0-preview1

-------------------------- Example 3: Save a gallery template as a JSON file --------------------------

When you find a gallery template that matches your resource needs, you can save it as a JSON file on disk. This makes it easy to review and analyze the resources that the template creates and the parameters (user-defined values) that it defines for each resource. Then, you can use the template with the New-AzureResourceGroup and New-AzureResourceGroupDeployment cmdlets.

PS C:\>Save-AzureResourceGroupGalleryTemplate -Identity Microsoft.PhotoGallery.0.1.0-preview1 -Path $home\Documents\Azure\MyTemplates
                       
PS C:\>Get-Content -Path $home\Documents\Azure\MyTemplates Microsoft.PhotoGallery.0.1.0-preview1.json {  "$schema": "http://johngosmanage.blob.core.windows.net/schemas/2014-04-01-preview/deploymentTemplate.json",  "contentVersion": "1.0.0.0",  "parameters": {    "siteName": {      "type": "string"    },    "hostingPlanName": {      "type": "string"  },...  "resources": [    {      "apiVersion": "2014-04-01",      "name": "[parameters('siteName')]",      "type": "Microsoft.Web/sites",      "location": "[parameters('siteLocation')]",      "tags": {        "[concat('hidden-related:/subscriptions/',       },      "properties": {        "name": "[parameters('siteName')]",        "serverFarm": "[parameters('hostingPlanName')]",        "computeMode": "[parameters('computeMode')]",        "siteMode": "[parameters('siteMode')]"      }...

-------------------------- Example 4: Get the category, identity, and summary of the templates --------------------------

This example shows you how to display the category (CategoryIds property), identity, and summary of each template in a list. You can use commands with this format to get any template property. To find all template properties, pipe a Get-AzureResourceGroupGalleryTemplate command with the Identity parameter to the Get-Member cmdlet. For example: (Get-AzureResourceGroupGalleryTemplate Microsoft.TeamProject.0.1.0-preview1 | Get-Member).

PS C:\>Get-AzureResourceGroupGalleryTemplate | Foreach-Object {Get-AzureResourceGroupGalleryTemplate -Identity $_.Identity} | Format-List -Property CategoryIds, Identity, Summary
CategoryIds : {web, blogscms, ecommerce}
Identity    : Acquiacom.AcquiaDrupal7MySQL.0.1.0-preview1
Summary     : Acquia Drupal 7 provides the fastest on-ramp to build dynamic and social web sites featuring both editorial and user-generated content.  Includes Drupal core and popular modules. 


CategoryIds : {web, other}
Identity    : Avensoft.nService.0.1.0-preview1
Summary     : Help desk and service management software that empowers you to provide great services to your employees and customers. This free edition allows one concurrent technician and unlimited end users. 
...

Online Version