From 896f9c81d6f1b4d07b0db66097495180a8d984e5 Mon Sep 17 00:00:00 2001 From: vivsriaus Date: Thu, 25 Feb 2016 13:34:25 -0800 Subject: [PATCH 1/7] Add help for invoke azure action --- ...mands.ResourceManager.Cmdlets.dll-Help.xml | 294 ++++++++++++++++++ 1 file changed, 294 insertions(+) diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Microsoft.Azure.Commands.ResourceManager.Cmdlets.dll-Help.xml b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Microsoft.Azure.Commands.ResourceManager.Cmdlets.dll-Help.xml index 3588112a2817..4b0f2c797d5a 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Microsoft.Azure.Commands.ResourceManager.Cmdlets.dll-Help.xml +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Microsoft.Azure.Commands.ResourceManager.Cmdlets.dll-Help.xml @@ -9695,6 +9695,300 @@ Remove-AzureRmPolicyDefinition -Id $policyDefinition.ResourceId -Force + + + + + Invoke-AzureRmResourceAction + + Invokes the specified action on a resource + + + + + Invoke + AzureRmResourceAction + + + + Invokes the specified action on a resource + + + + Invoke-AzureRmResourceAction + + Parameters + + A hashtable that reperesents the resource properties + + String + + + Force + + Do not ask for confirmation + + SwitchParameter + + + ApiVersion + + The api version to use while invoking the action on the resource. + + String + + + Pre + + + + SwitchParameter + + + InformationAction + + + + ActionPreference + + + InformationVariable + + + + String + + + + + + Parameters + + A hashtable that reperesents the resource properties + + String + + + Force + + Do not ask for confirmation + + SwitchParameter + + + ApiVersion + + The api version to use while invoking the action on the resource. + + String + + + Pre + + + + SwitchParameter + + SwitchParameter + + + + + + InformationAction + + + + ActionPreference + + ActionPreference + + + + + + InformationVariable + + + + String + + String + + + + + + Action + + The name of the action to invoke. + + String + + String + + + + + + ResourceId + + The fully qualified resource Id, including the subscription. e.g. /subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers/myServer/databases/myDatabase + + String + + String + + + + + + ResourceName + + The resource name. e.g. to specify a database MyServer/MyDatabase. + + String + + String + + + + + + ResourceType + + The resource type. e.g. Microsoft.Sql/Servers/Databases. + + String + + String + + + + + + + ExtensionResourceName + + The extension resource name. e.g. to specify a database MyServer/MyDatabase. + + String + + String + + + + + + + ExtensionResourceType + + The extension resource type. e.g. Microsoft.Sql/Servers/Databases. + + String + + String + + + + + + + ODataQuery + + An OData style filter which will be appended to the request in addition to any other filters. + + String + + String + + + + + + + ResourceGroupName + + The resource group name. + + String + + String + + + + + + + TenantLevel + + + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Invoke list action on website config resource -------------------------- + + PS C:\> + + Invoke-AzureRmResourceAction -ResourceGroupName myGroup -ResourceType Microsoft.Web/sites/config/list -ResourceName mySite/appsettings -Action list -ApiVersion 2015-08-01 -Force + + Invokes the list action on website config + + + + + + + + + + + + + + + From 7a33b15b558b47989ef922da6840bcf4d1c91066 Mon Sep 17 00:00:00 2001 From: vivsriaus Date: Thu, 25 Feb 2016 13:45:55 -0800 Subject: [PATCH 2/7] Add help for mode --- .../Microsoft.Azure.Commands.Resources.dll-Help.xml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml b/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml index f08bfe8cd8b9..e0487f8cbd86 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml +++ b/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml @@ -5106,6 +5106,19 @@ Resources + + Mode + + The deployment mode to use. Default is Incremental. If 'Complete' deployment mode is used, existing resources in the resource group that are not included in the template will be deleted. For more information, please refer to https://azure.microsoft.com/en-us/documentation/articles/resource-group-template-deploy/ + + String + + String + + + + + From 62a8bbffb9419a5b63fc1d5996d8e058f05f10ef Mon Sep 17 00:00:00 2001 From: vivsriaus Date: Thu, 25 Feb 2016 13:47:12 -0800 Subject: [PATCH 3/7] Add force to deployment help --- .../Microsoft.Azure.Commands.Resources.dll-Help.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml b/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml index e0487f8cbd86..70e8555e747e 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml +++ b/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml @@ -5119,6 +5119,13 @@ Resources + + Force + + Do not ask for confirmation + + SwitchParameter + From f8ac76efb35925487460007bec41c6a797897468 Mon Sep 17 00:00:00 2001 From: vivsriaus Date: Thu, 25 Feb 2016 13:55:36 -0800 Subject: [PATCH 4/7] Format help description for template deployment --- .../Microsoft.Azure.Commands.Resources.dll-Help.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml b/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml index 70e8555e747e..39f90e76beb9 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml +++ b/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml @@ -4686,7 +4686,10 @@ Resources This is the Description section - The New-AzureRmResourceGroupDeployment cmdlet adds a deployment to an existing resource group, including the resources that the deployment requires. This cmdlet is similar to the New-AzureRmResourceGroup cmdlet, but it works on existing resource groups, instead of new ones. To add resources to a resource group without using a template, use the New-AzureRmResource cmdlet.An Azure resource is a user-managed Azure entity, such as a database server, database, website, virtual machine, or storage account. An Azure resource group is a collection of Azure resources that are deployed as a unit, such as the web site, database server, and databases that are required for a financial web site. A deployment uses a resource group template to add resource to a resource group and publish them so they are available in Azure.To add a resource group deployment, specify the name of an existing resource group and a resource group template, which is a JSON string that represents of a resource group for a complex cloud-based service, such as a web portal. The template includes parameter (placeholders) for required resources and configurable property values, likes names and sizes. You can find many templates in the Azure template gallery and you can create your own templates.To find a gallery template, use the Get-AzureRmResourceGroupGalleryTemplate template cmdlet. To use a gallery template, use the GalleryTemplateIdentity parameter of New-AzureRmResourceGroupDeployment to specify the template identity. Or, use the Save-AzureRmResourceGalleryTemplate cmdlet to save the gallery template as a JSON file, and then use the TemplateFile or TemplateUri parameters to provide the name and location of the file.You can also create a custom resource group template, either by typing in a text file or by editing a gallery template. To use a custom template to create a resource group, use TemplateFile or TemplateUri parameters to supply the location and file name.Each template has different parameters for configurable properties. To specify values for the template parameters, use a JSON-formatted parameter file (TemplateParameterFile parameter) or a hash table of parameter names and values (TemplateParameterObject parameter). Or, use the template parameters that are added to the command dynamically as soon as you specify a template. To use the dynamic parameters, just type them in the command, or type a minus sign to indicate a parameter name (-) and then press the TAB key repeatedly to cycle through the available parameters. If you miss a required parameter, the cmdlet prompts you for the value. Template parameter values that are typed at the command line take precedence over values in a template parameter object or file. + The New-AzureRmResourceGroupDeployment cmdlet adds a deployment to an existing resource group, including the resources that the deployment requires. To add resources to a resource group without using a template, use the New-AzureRmResource cmdlet. + An Azure resource is a user-managed Azure entity, such as a database server, database, website, virtual machine, or storage account. An Azure resource group is a collection of Azure resources that are deployed as a unit, such as the web site, database server, and databases that are required for a financial web site. A deployment uses a resource group template to add resource to a resource group and publish them so they are available in Azure. + To add a resource group deployment, specify the name of an existing resource group and a resource group template, which is a JSON string that represents of a resource group for a complex cloud-based service, such as a web portal. The template includes parameter (placeholders) for required resources and configurable property values, likes names and sizes. You can find many templates in the Azure template gallery and you can create your own templates. + You can also create a custom resource group template, either by typing in a text file or by editing a gallery template. To use a custom template to create a resource group, use TemplateFile or TemplateUri parameters to supply the location and file name. Each template has different parameters for configurable properties. To specify values for the template parameters, use a JSON-formatted parameter file (TemplateParameterFile parameter) or a hash table of parameter names and values (TemplateParameterObject parameter). Or, use the template parameters that are added to the command dynamically as soon as you specify a template. To use the dynamic parameters, just type them in the command, or type a minus sign to indicate a parameter name (-) and then press the TAB key repeatedly to cycle through the available parameters. If you miss a required parameter, the cmdlet prompts you for the value. Template parameter values that are typed at the command line take precedence over values in a template parameter object or file. From c41daf6b8489ef87916a5ae460ec886aa5accfb2 Mon Sep 17 00:00:00 2001 From: vivsriaus Date: Thu, 25 Feb 2016 13:58:13 -0800 Subject: [PATCH 5/7] Add reference uri to template deployment help --- .../Microsoft.Azure.Commands.Resources.dll-Help.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml b/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml index 39f90e76beb9..2201b1ab49c6 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml +++ b/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml @@ -4690,6 +4690,7 @@ Resources An Azure resource is a user-managed Azure entity, such as a database server, database, website, virtual machine, or storage account. An Azure resource group is a collection of Azure resources that are deployed as a unit, such as the web site, database server, and databases that are required for a financial web site. A deployment uses a resource group template to add resource to a resource group and publish them so they are available in Azure. To add a resource group deployment, specify the name of an existing resource group and a resource group template, which is a JSON string that represents of a resource group for a complex cloud-based service, such as a web portal. The template includes parameter (placeholders) for required resources and configurable property values, likes names and sizes. You can find many templates in the Azure template gallery and you can create your own templates. You can also create a custom resource group template, either by typing in a text file or by editing a gallery template. To use a custom template to create a resource group, use TemplateFile or TemplateUri parameters to supply the location and file name. Each template has different parameters for configurable properties. To specify values for the template parameters, use a JSON-formatted parameter file (TemplateParameterFile parameter) or a hash table of parameter names and values (TemplateParameterObject parameter). Or, use the template parameters that are added to the command dynamically as soon as you specify a template. To use the dynamic parameters, just type them in the command, or type a minus sign to indicate a parameter name (-) and then press the TAB key repeatedly to cycle through the available parameters. If you miss a required parameter, the cmdlet prompts you for the value. Template parameter values that are typed at the command line take precedence over values in a template parameter object or file. + For more information about deploying template, please refer https://azure.microsoft.com/en-us/documentation/articles/resource-group-template-deploy/ From 7d028cf6f4dd77712ae00e00e55a70b0ab499084 Mon Sep 17 00:00:00 2001 From: vivsriaus Date: Thu, 25 Feb 2016 15:07:49 -0800 Subject: [PATCH 6/7] Add help for remove deployment, update test deployment help --- ...soft.Azure.Commands.Resources.dll-Help.xml | 359 ++++++------------ 1 file changed, 123 insertions(+), 236 deletions(-) diff --git a/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml b/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml index 2201b1ab49c6..2ba20d8c0c07 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml +++ b/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml @@ -8385,235 +8385,6 @@ True - - - - Save-AzureRmResourceGroupGalleryTemplate - - Saves a gallery template to a JSON file - - - - - Save - AzureResourceGroupGalleryTemplate - - - - This is the Description section - The Save-AzureRmResourceGroupGalleryTemplate cmdlet saves a template from the Azure template gallery as a JSON file on disk and returns the path to the saved file. You can to use the template to create Azure resource groups and deploymentsA resource is a user-managed entity, such as a website, database server, or database. A resource group is a collection of resources that are deployed as a unit. You can create resources individually and add them to resource groups. However, typically, you create a resource group by using a template.A template is a JSON string that defines a resource group for a complex entity, such as a web hosting site or web portal. The template defines the resources that are typically needed for the entity, such as websites, databases, and storage accounts, and includes parameters for user-defined values, such as the names and properties of the resources. To get a resource group template, use the Get-AzureRmResourceGroupGalleryTemplate cmdlet to get a gallery template and then use the Save-AzureRmResourceGroupGalleryTemplate cmdlet to save the template as a JSON file. Or, you can create your own templates, either from scratch or by editing a gallery template. To verify the syntax of a template, use the Test-AzureResourceGroupDeployment cmdlet.To use a template to create a resource group, use the New-AzureRmResourceGroup or New-AzureRmResourceGroupDeployment cmdlets. Just identify the template and provide values for its parameters. - - - - Save-AzureRmResourceGroupGalleryTemplate - - Identity - - Specifies the identity of the gallery item. This parameter is required. The gallery item identity is also used as the name of the template file on disk with a .JSON file name extension. - - String - - - Path - - Specifies the path to the directory in which the template is saved. This parameter is optional. The default is the current directory. - - String - - - Force - - Suppresses the confirmation prompt. By default, if you specify a path and file name that already exists, Save-AzureRmResourceGroupGalleryTemplate prompts before overwriting the file. - - SwitchParameter - - - Profile - - - - AzureProfile - - - - - - Identity - - Specifies the identity of the gallery item. This parameter is required. The gallery item identity is also used as the name of the template file on disk with a .JSON file name extension. - - String - - String - - - - - - - Path - - Specifies the path to the directory in which the template is saved. This parameter is optional. The default is the current directory. - - String - - String - - - - - - - Force - - Suppresses the confirmation prompt. By default, if you specify a path and file name that already exists, Save-AzureRmResourceGroupGalleryTemplate prompts before overwriting the file. - - SwitchParameter - - SwitchParameter - - - - - - - Profile - - - - AzureProfile - - AzureProfile - - - - - - - - - - None - - - - - - - - - - - - - - System.Management.Automation.PSCustomObject - - - - - - - - - - - - - - - - - - - - Keywords: azure, azurerm, arm, resource, management, manager, resource, group, template, deployment - - - - - -------------------------- Example 1: Save a template -------------------------- - - PS C:\> - - PS C:\>Save-AzureRmResourceGroupGalleryTemplate -Identity Microsoft.WebSite.0.1.0-preview1 -Path: - -C:\ Microsoft.WebSite.0.1.0-preview1.json - - This command saves the Microsoft.WebSite.0.1.0-preview1 template to the current directory as Microsoft.WebSite.0.1.0-preview1.json. - - - - - - - - - - - - - - - -------------------------- Example 2: Pipe a gallery item to SaveAzureResourceGroupGalleryTemplate -------------------------- - - PS C:\> - - PS C:\>Get-AzureRmResourceGroupGalleryTemplate -Identity Microsoft.WebSite.0.1.0-preview1 | Save-AzureRmResourceGroupGalleryTemplate -Path $home\Documents\MyTemplates -Path - -C:\Users\User01\Documents\MyTemplates\ Microsoft.WebSite.0.1.0-preview1.json - - This command pipes the Microsoft.WebSite.0.1.0-preview1 gallery item from the Get-AzureRmResourceGroupGalleryTemplate cmdlet to the Save-AzureRmResourceGroupGalleryTemplate cmdlet. The command uses the Path parameter to save the JSON template in an alternate directory. Because the command uses the Passthru parameter, the cmdlet returns True to indicate that the save operation succeeded. - - - - - - - - - - - - - - - -------------------------- Example 3: Save and use a gallery template -------------------------- - - PS C:\> - - PS C:\> The first command uses the Save-AzureRmResourceGalleryTemplate cmdlet to save a template to disk. The cmdlet returns the path to the JSON file. -PS C:\>Save-AzureRmResourceGroupGalleryTemplate -Identity TechInfoSystems.GalleryServerPro.0.1.0-preview1 -Path $home\Documents\MyTemplates -Path - -C:\Users\User01\Documents\MyTemplates\TechInfoSystems.GalleryServerPro.0.1.0-preview1.json - -The second command uses the New-AzureRmResourceGroup cmdlet to create a new resource group based on the template. To specify the saved template, the command uses the TemplateFile parameter, which takes a path to a JSON file on disk. To specify the template parameters, the command uses the TemplateParameterFile parameter, which takes a path to a JSON file of parameters and parameter values.The command returns the newly created resource group. -PS C:\>New-AzureRmResourceGroup -Name ContosoRG02 -Location 'South Central US' -DeploymentName DeployWeb1 –StorageAccountName contosostorage01 -TemplateFile $home\Documents\MyTemplates\TechInfoSystems.GalleryServerPro.0.1.0-preview1.json -TemplateParameterFile $home\Documents\MyTemplates\TechInfoParameters.json - - This example shows how to use a saved gallery template to create a new resource group. - - - It's often useful to save a gallery template to disk before using it to create a resource group or a deployment. This gives you the opportunity to review the template and the resources that it creates and to determine that values that you will use for the parameters. But, you do not need to save a gallery template before using it to create a resource group. To use a gallery template without saving it, use the GalleryTemplateIdentity parameter of the New-AzureRmResourceGroup or New-AzureRmResourceGroupDeployment cmdlets. - - - - - - - - - - - - - Online Version: - http://go.microsoft.com/fwlink/?LinkID=393053 - - - @@ -9245,7 +9016,7 @@ Tags: - Test-AzureResourceGroupDeployment + Test-AzureRmResourceGroupDeployment Detects errors in a resource group template or template parameters @@ -9253,12 +9024,13 @@ Tags: Test - AzureResourceGroupTemplate + AzureRmResourceGroupDeployment This is the Description section - The Test-AzureResourceGroupDeployment cmdlet verifies the validity of a resource group template, its parameters, and parameter values. It returns errors that it finds. Otherwise, it does not return any output.To specify a template, use the GalleryTemplateIdentity or TemplateFile parameters. To specify the template parameter values, use the TemplateParameterFile or TemplateParameterObject parameters, or use the template parameters that are added to the command dynamically when you specify the template. To get the parameters, just type a minus sign (-) to indicate a parameter name and press the TAB key to trigger tab-completion. If you miss a required parameter, the cmdlet prompts you for the value. Parameter values typed at the command line take precedence over values in a template parameter object or file.A resource group template is a JSON-based model of a resource group for a complex cloud-based service, such as a web portal. You can use a resource group template to create a resource group or resource group deployment. The template includes parameter (placeholders) for configurable property values, likes names and sizes. You can find many templates in the Azure template gallery (Get-AzureRmResourceGroupGalleryTemplate) and you can create your own templates. + The Test-AzureResourceGroupDeployment cmdlet verifies the validity of a resource group template, its parameters, and parameter values. It returns errors that it finds. Otherwise, it does not return any output. + To specify a template, use the TemplateUri or TemplateFile parameters. To specify the template parameter values, use the TemplateParameterFile or TemplateParameterObject parameters, or use the template parameters that are added to the command dynamically when you specify the template. To get the parameters, just type a minus sign (-) to indicate a parameter name and press the TAB key to trigger tab-completion. If you miss a required parameter, the cmdlet prompts you for the value. Parameter values typed at the command line take precedence over values in a template parameter object or file.A resource group template is a JSON-based model of a resource group for a complex cloud-based service, such as a web portal. You can use a resource group template to create a resource group or resource group deployment. The template includes parameter (placeholders) for configurable property values, likes names and sizes. You can find many templates in the Azure template gallery and you can create your own templates. @@ -9625,7 +9397,7 @@ Tags: PS C:\> - PS C:\>Test-AzureResourceGroupDeployment -ResourceGroupName ContosoLabsRG -TemplateFile $home\Documents\Azure\Templates\CustomHostingPlan.json -TemplateParameterFile $home\Documents\Azure\Templates\HostingPlanParms.jsonPS C:> + PS C:\>Test-AzureRmResourceGroupDeployment -ResourceGroupName ContosoLabsRG -TemplateFile $home\Documents\Azure\Templates\CustomHostingPlan.json -TemplateParameterFile $home\Documents\Azure\Templates\HostingPlanParms.jsonPS C:> This command tests a custom template file, CustomHostingPlan.json, and a template parameter file, HostingPlanParms.json. Because the cmdlet does not find any errors, it does not return any output. @@ -9642,13 +9414,13 @@ Tags: - -------------------------- Example 3: Test a template with dynamic parameter values -------------------------- + -------------------------- Example 2: Test a template with dynamic parameter values -------------------------- PS C:\> - PS C:\>Test-AzureResourceGroupDeployment -ResourceGroupName ContosoLabsRG -TemplateFile C:\Users\juneb\Documents\Azure\Templates\NewHostingPlan.json -siteName ContosoDev -siteMode Limited -computeMode Shared -siteLocation 'South Central US' -sku FreeCode : InvalidTemplateMessage : Deployment template validation failed: 'The template parameter 'hostingPlanName' is not valid.'. + PS C:\>Test-AzureRmResourceGroupDeployment -ResourceGroupName ContosoLabsRG -TemplateFile C:\Users\juneb\Documents\Azure\Templates\NewHostingPlan.json -siteName ContosoDev -siteMode Limited -computeMode Shared -siteLocation 'South Central US' -sku Free. - This command uses the Test-AzureResourceGroupDeployment cmdlet to test a custom template. Instead of providing the template parameter names, we used the feature that adds the template parameters to command dynamically. + This command uses the Test-AzureRmResourceGroupDeployment cmdlet to test a custom template. Instead of providing the template parameter names, we used the feature that adds the template parameters to command dynamically. To use the dynamic parameters, type a minus sign (-) to indicate a parameter name and press the TAB key. The tab-completion feature supplies parameter name. To cycle through all of the parameter names, press the TAB key repeatedly. In this case, we used the dynamic parameters to specify all of the parameter names at the command line.In this case, even though the template parameter names and values are correct, the Parameters section in the custom template is missing the hostingPlan parameter that is specified in the Resource section of the template. The cmdlet detects and reports this error. @@ -14049,4 +13821,119 @@ PS C:\>Get-AzureRmResourceGroupLog -Name ContosoLabsRG -DeploymentName LabDep + + + + Remove-AzureRmResourceGroupDeployment + + Removes the specified resource group deployment. + + + + + Remove + AzureResourceGroupDeployment + + + + The Remove-AzureRmResourceGroupDeployment removes the specified deployment. + + + + Remove-AzureRmResourceGroupDeployment + + Name + + The deployment name. Use -Name or its alias -DeploymentName. + + String + + + ResourceGroupName + + Specifies the name of the resource group under which the deployment exists. This parameter is required. If the resource group does not exist, the command fails. + + String + + + + + + Name + + The deployment name. Use -Name or its alias -DeploymentName. + + String + + + ResourceGroupName + + Specifies the name of the resource group under which the deployment exists. This parameter is required. If the resource group does not exist, the command fails. + + String + + + Force + + Do not ask for confirmation + + SwitchParameter + + + + + + None + + + + + + + + + + + + + + + + + + + + + + + + Keywords: azure, azurerm, arm, resource, management, manager, resource, group, template, deployment + + + + + -------------------------- Example 1: Remove an existing deployment -------------------------- + + PS C:\> + + PS C:\>Remove-AzureRmResourceGroupDeployment -ResourceGroupName ContosoEngineering -Name contosoDeployment + + This command removes the deployment 'contosoDeployment' from 'ContosoEngineering' resource group. + + + + + + + + + + + + + + + + + From 83ab72da45ed2931be92916762b8cda2d50876b4 Mon Sep 17 00:00:00 2001 From: vivsriaus Date: Thu, 25 Feb 2016 15:16:48 -0800 Subject: [PATCH 7/7] Remove references to gallery --- ...soft.Azure.Commands.Resources.dll-Help.xml | 382 +----------------- 1 file changed, 19 insertions(+), 363 deletions(-) diff --git a/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml b/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml index 2ba20d8c0c07..be0ff169384e 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml +++ b/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml @@ -1975,306 +1975,6 @@ ContosoLabsRG WordPress.WordPress Succ - - - - Get-AzureRmResourceGroupGalleryTemplate - - Gets resource group templates in the gallery - - - - - Get - AzureResourceGroupGalleryTemplate - - - - This is the Description section - The Get-AzureRmResourceGroupGalleryTemplate 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-AzureRmResourceGroupGalleryTemplate 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-AzureRmResourceGroupGalleryTemplate 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-AzureResourceGroupDeployment 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-AzureRmResourceGroup or New-AzureRmResourceGroupDeployment cmdlets.By default the cmdlet gets only the latest version of the template. To get all versions, use the -AllVersions parameter flag. - - - - Get-AzureRmResourceGroupGalleryTemplate - - Publisher - - Gets only gallery templates from the specified publisher. Enter one publisher name. Wildcards are not permitted. This parameter is optional. By default, Get-AzureRmResourceGroupGalleryTemplate gets all gallery templates. - - String - - - Category - - 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-AzureRmResourceGroupGalleryTemplate gets all gallery templates. - - String - - - ApplicationName - - - - String - - - AllVersions - - If specified, the cmdlet will return all versions of matching templates. By default only the latest version is returned. - - SwitchParameter - - - Profile - - - - AzureProfile - - - - Get-AzureRmResourceGroupGalleryTemplate - - Identity - - 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-AzureRmResourceGroupGalleryTemplate without parameters. - - String - - - Profile - - - - AzureProfile - - - - - - Publisher - - Gets only gallery templates from the specified publisher. Enter one publisher name. Wildcards are not permitted. This parameter is optional. By default, Get-AzureRmResourceGroupGalleryTemplate gets all gallery templates. - - String - - String - - - - - - - Category - - 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-AzureRmResourceGroupGalleryTemplate gets all gallery templates. - - String - - String - - - - - - - ApplicationName - - - - String - - String - - - - - - - AllVersions - - If specified, the cmdlet will return all versions of matching templates. By default only the latest version is returned. - - SwitchParameter - - SwitchParameter - - - - - - - Profile - - - - AzureProfile - - AzureProfile - - - - - - - Identity - - 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-AzureRmResourceGroupGalleryTemplate without parameters. - - String - - String - - - - - - - - - - None - - - - - - - - - - - - - - System.Management.Automation.PSCustomObject - - - - - - - - - - - - - - - - - - - - Keywords: azure, azurerm, arm, resource, management, manager, resource, group, template, deployment - - - - - -------------------------- Example 1: Get all gallery templates -------------------------- - - PS C:\> - - PS C:\>Get-AzureRmResourceGroupGalleryTemplate - -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... - - 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. - - - To save the list in a text file that you can search, use the redirection operator (>). For example, Get-AzureRmResourceGroupGalleryTemplate | Format-List Identity, Description > $home\Documents\Azure\TemplateDescriptions.txt. - - - - - - - - - - - -------------------------- Example 2: Get a gallery template by its identity -------------------------- - - PS C:\> - - PS C:\> PS C:\ps-test> Get-AzureRmResourceGroupGalleryTemplate -Identity WikimediaFoundation.MediaWiki.0.1.0-preview1 - - This command uses the Get-AzureRmResourceGroupGalleryTemplate 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. - - - - - - - - - - - - - - - -------------------------- Example 3: Save a gallery template as a JSON file -------------------------- - - PS C:\> - - PS C:\>Save-AzureRmResourceGroupGalleryTemplate -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')]" }... - - 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-AzureRmResourceGroup and New-AzureRmResourceGroupDeployment cmdlets. - - - The first command uses the Save-AzureRmResourceGroupGalleryTemplate cmdlet to save the Microsoft.PhotoGallery.0.1.0-preview1 gallery template as a JSON file in the path that you specify.The second command uses the Get-Content cmdlet to get the content of the template file. The output that's displayed here is just an excerpt of the JSON template file, but you can see the Parameters and Resources attributes that are common to every template file. To see examples of using the template, type: Get-Help New-AzureRmResourceGroup or Get-Help New-AzureRmResourceGroupDeployment. - - - - - - - - - - - -------------------------- Example 4: Get the category, identity, and summary of the templates -------------------------- - - PS C:\> - - PS C:\>Get-AzureRmResourceGroupGalleryTemplate | Foreach-Object {Get-AzureRmResourceGroupGalleryTemplate -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. -... - - 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-AzureRmResourceGroupGalleryTemplate command with the Identity parameter to the Get-Member cmdlet. For example: (Get-AzureRmResourceGroupGalleryTemplate Microsoft.TeamProject.0.1.0-preview1 | Get-Member). - - - - - - - - - - - - - - - - - Online Version: - http://go.microsoft.com/fwlink/?LinkID=393052 - - - @@ -4484,7 +4184,7 @@ NewApplication 61b5d8ea-fdc6-40a2 This is the Description section - The New-AzureRmResourceGroup cmdlet creates an Azure resource group and its resources and returns an object that represents the resource group.Use this cmdlet to create a new resource group. To add a deployment to an existing resource group, use the New-AzureRmResourceGroupDeployment cmdlet. To add a resource to an existing resource group, use the New-AzureRmResource cmdlet.An Azure resource is a user-managed Azure entity, such as a database server, database, or web site. An Azure resource group is a collection of Azure resources that are deployed as a unit.You can create a resource group with just a name and location, and then use the New-AzureRmResource cmdlet to create resources and add them to the resource group. However, typically, you use a resource group template, which is a JSON-based model of a resource group for a complex cloud-based service, such as a web portal. You can find many templates in the Azure template gallery (Get-AzureRmResourceGroupGalleryTemplate) and you can create your own templates.To find a gallery template, use the Get-AzureRmResourceGroupGalleryTemplate template cmdlet. To use a gallery template, use the GalleryTemplateIdentity parameter of New-AzureRmResourceGroup to specify the template identity. Or, use the Save-AzureRmResourceGalleryTemplate cmdlet to save the gallery template as a JSON file, and then use the TemplateFile or TemplateUri parameters to provide the name and location of the file.You can also create a custom resource group template, either by typing in a text file or by editing a gallery template. To use a custom template to create a resource group, use TemplateFile or TemplateUri parameters to supply the location and file name.The template includes parameters (placeholders) for configurable property values, likes names and sizes. To specify values for the template parameters, use a JSON-formatted parameter file (TemplateParameterFile parameter) or a hash table of parameter names and values (TemplateParameterObject parameter). Or, you can use the template parameters that are added to the command dynamically as soon as you specify a template. To use the dynamic parameters, just type them in the command, or type a minus sign to indicate a parameter name (-) and then press the TAB key repeatedly to cycle through the available parameters. If you miss a required template parameter, the cmdlet prompts you for the value. Template parameter values that you specify at the command line take precedence over template parameter values in a template parameter object or file. + The New-AzureRmResourceGroup cmdlet creates an Azure resource group and returns an object that represents the resource group. @@ -4743,7 +4443,7 @@ Resources TemplateUri - Specifies the URI of a JSON template file. This file can be a custom template or a gallery template that is saved as a JSON file, such as by using the Save-AzureRmResourceGroupGalleryTemplate cmdlet. + Specifies the URI of a JSON template file. This file can be a custom template or a gallery template that is saved as a JSON file. String @@ -4781,7 +4481,7 @@ Resources TemplateFile - Specifies the path and file name of a JSON template file on disk. This can be a custom template or a gallery template that is saved to disk as a JSON file, such as by using the Save-AzureRmResourceGroupGalleryTemplate cmdlet.To use this parameter, the subscription must include a storage account where the cmdlet can save the template. By default, this cmdlet uses the current storage account in the subscription, but you can use the StorageAccountName parameter to specify an alternate storage account. If you do not specify a storage account and the subscription does not have a storage account that is designated as "current," the command fails.To create a storage account, use the Switch-AzureMode cmdlet to switch to the Azure module, and then use the New-AzureRmStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureRmSubscription cmdlet. + Specifies the path and file name of a JSON template file on disk. This can be a custom template or a gallery template that is saved to disk as a JSON file. String @@ -4881,7 +4581,7 @@ Resources TemplateUri - Specifies the URI of a JSON template file. This file can be a custom template or a gallery template that is saved as a JSON file, such as by using the Save-AzureRmResourceGroupGalleryTemplate cmdlet. + Specifies the URI of a JSON template file. This file can be a custom template or a gallery template that is saved as a JSON file. String @@ -4919,7 +4619,7 @@ Resources TemplateFile - Specifies the path and file name of a JSON template file on disk. This can be a custom template or a gallery template that is saved to disk as a JSON file, such as by using the Save-AzureRmResourceGroupGalleryTemplate cmdlet.To use this parameter, the subscription must include a storage account where the cmdlet can save the template. By default, this cmdlet uses the current storage account in the subscription, but you can use the StorageAccountName parameter to specify an alternate storage account. If you do not specify a storage account and the subscription does not have a storage account that is designated as "current," the command fails.To create a storage account, use the Switch-AzureMode cmdlet to switch to the Azure module, and then use the New-AzureRmStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureRmSubscription cmdlet. + Specifies the path and file name of a JSON template file on disk. This can be a custom template or a gallery template that is saved to disk as a JSON file. String @@ -4974,7 +4674,7 @@ Resources TemplateFile - Specifies the path and file name of a JSON template file on disk. This can be a custom template or a gallery template that is saved to disk as a JSON file, such as by using the Save-AzureRmResourceGroupGalleryTemplate cmdlet.To use this parameter, the subscription must include a storage account where the cmdlet can save the template. By default, this cmdlet uses the current storage account in the subscription, but you can use the StorageAccountName parameter to specify an alternate storage account. If you do not specify a storage account and the subscription does not have a storage account that is designated as "current," the command fails.To create a storage account, use the Switch-AzureMode cmdlet to switch to the Azure module, and then use the New-AzureRmStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureRmSubscription cmdlet. + Specifies the path and file name of a JSON template file on disk. This can be a custom template or a gallery template that is saved to disk as a JSON file. String @@ -5005,7 +4705,7 @@ Resources TemplateUri - Specifies the URI of a JSON template file. This file can be a custom template or a gallery template that is saved as a JSON file, such as by using the Save-AzureRmResourceGroupGalleryTemplate cmdlet. + Specifies the URI of a JSON template file. This file can be a custom template or a gallery template that is saved as a JSON file. String @@ -5074,7 +4774,7 @@ Resources TemplateUri - Specifies the URI of a JSON template file. This file can be a custom template or a gallery template that is saved as a JSON file, such as by using the Save-AzureRmResourceGroupGalleryTemplate cmdlet. + Specifies the URI of a JSON template file. This file can be a custom template or a gallery template that is saved as a JSON file. String @@ -5087,7 +4787,7 @@ Resources TemplateFile - Specifies the path and file name of a JSON template file on disk. This can be a custom template or a gallery template that is saved to disk as a JSON file, such as by using the Save-AzureRmResourceGroupGalleryTemplate cmdlet.To use this parameter, the subscription must include a storage account where the cmdlet can save the template. By default, this cmdlet uses the current storage account in the subscription, but you can use the StorageAccountName parameter to specify an alternate storage account. If you do not specify a storage account and the subscription does not have a storage account that is designated as "current," the command fails.To create a storage account, use the Switch-AzureMode cmdlet to switch to the Azure module, and then use the New-AzureRmStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureRmSubscription cmdlet. + Specifies the path and file name of a JSON template file on disk. This can be a custom template or a gallery template that is saved to disk as a JSON file. String @@ -9045,7 +8745,7 @@ Tags: TemplateFile - Specifies the path and file name of a JSON template file on disk. This can be a custom template or a gallery template that is saved to disk as a JSON file, such as by using the Save-AzureRmResourceGroupGalleryTemplate cmdlet.To use this parameter, the subscription must include a storage account where the cmdlet can save the template. By default, this cmdlet uses the current storage account in the subscription, but you can use the StorageAccountName parameter to specify an alternate storage account. If you do not specify a storage account and the subscription does not have a storage account that is designated as "current," the command fails.To create a storage account, use the Switch-AzureMode cmdlet to switch to the Azure module, and then use the New-AzureRmStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureRmSubscription cmdlet. + Specifies the path and file name of a JSON template file on disk. This can be a custom template or a gallery template that is saved to disk as a JSON file. String @@ -9076,7 +8776,7 @@ Tags: TemplateUri - Specifies the URI of a JSON template file. This file can be a custom template or a gallery template that is saved as a JSON file, such as by using the Save-AzureRmResourceGroupGalleryTemplate cmdlet. + Specifies the URI of a JSON template file. This file can be a custom template or a gallery template that is saved as a JSON file. String @@ -9107,7 +8807,7 @@ Tags: TemplateFile - Specifies the path and file name of a JSON template file on disk. This can be a custom template or a gallery template that is saved to disk as a JSON file, such as by using the Save-AzureRmResourceGroupGalleryTemplate cmdlet.To use this parameter, the subscription must include a storage account where the cmdlet can save the template. By default, this cmdlet uses the current storage account in the subscription, but you can use the StorageAccountName parameter to specify an alternate storage account. If you do not specify a storage account and the subscription does not have a storage account that is designated as "current," the command fails.To create a storage account, use the Switch-AzureMode cmdlet to switch to the Azure module, and then use the New-AzureRmStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureRmSubscription cmdlet. + Specifies the path and file name of a JSON template file on disk. This can be a custom template or a gallery template that is saved to disk as a JSON file. String @@ -9186,7 +8886,7 @@ Tags: TemplateUri - Specifies the URI of a JSON template file. This file can be a custom template or a gallery template that is saved as a JSON file, such as by using the Save-AzureRmResourceGroupGalleryTemplate cmdlet. + Specifies the URI of a JSON template file. This file can be a custom template or a gallery template that is saved as a JSON file. String @@ -9217,7 +8917,7 @@ Tags: TemplateFile - Specifies the path and file name of a JSON template file on disk. This can be a custom template or a gallery template that is saved to disk as a JSON file, such as by using the Save-AzureRmResourceGroupGalleryTemplate cmdlet.To use this parameter, the subscription must include a storage account where the cmdlet can save the template. By default, this cmdlet uses the current storage account in the subscription, but you can use the StorageAccountName parameter to specify an alternate storage account. If you do not specify a storage account and the subscription does not have a storage account that is designated as "current," the command fails.To create a storage account, use the Switch-AzureMode cmdlet to switch to the Azure module, and then use the New-AzureRmStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureRmSubscription cmdlet. + Specifies the path and file name of a JSON template file on disk. This can be a custom template or a gallery template that is saved to disk as a JSON file. String @@ -9258,7 +8958,7 @@ Tags: TemplateUri - Specifies the URI of a JSON template file. This file can be a custom template or a gallery template that is saved as a JSON file, such as by using the Save-AzureRmResourceGroupGalleryTemplate cmdlet. + Specifies the URI of a JSON template file. This file can be a custom template or a gallery template that is saved as a JSON file. String @@ -9288,7 +8988,7 @@ Tags: TemplateFile - Specifies the path and file name of a JSON template file on disk. This can be a custom template or a gallery template that is saved to disk as a JSON file, such as by using the Save-AzureRmResourceGroupGalleryTemplate cmdlet.To use this parameter, the subscription must include a storage account where the cmdlet can save the template. By default, this cmdlet uses the current storage account in the subscription, but you can use the StorageAccountName parameter to specify an alternate storage account. If you do not specify a storage account and the subscription does not have a storage account that is designated as "current," the command fails.To create a storage account, use the Switch-AzureMode cmdlet to switch to the Azure module, and then use the New-AzureRmStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureRmSubscription cmdlet. + Specifies the path and file name of a JSON template file on disk. This can be a custom template or a gallery template that is saved to disk as a JSON file. String @@ -9327,7 +9027,7 @@ Tags: TemplateUri - Specifies the URI of a JSON template file. This file can be a custom template or a gallery template that is saved as a JSON file, such as by using the Save-AzureRmResourceGroupGalleryTemplate cmdlet. + Specifies the URI of a JSON template file. This file can be a custom template or a gallery template that is saved as a JSON file. String @@ -12821,7 +12521,7 @@ Tags: PropertyObject - Specifies properties values for the properties of a resource. Enter a hash table in @{propertyName = propertyValue} format. This parameter is optional.Use this parameter to specify the values of properties that are specific to a resource type. To find the properties that you can set for each type of resource, look at a few gallery templates, such as the templates that the Get-AzureRmResourceGroupGalleryTemplate cmdlet returns.For more information about hash tables in Windows PowerShell, type: Get-Help about_Hash_Tables (http://go.microsoft.com/fwlink/?LinkID=324844). + Specifies properties values for the properties of a resource. Enter a hash table in @{propertyName = propertyValue} format. This parameter is optional.Use this parameter to specify the values of properties that are specific to a resource type. To find the properties that you can set for each type of resource, look at a few gallery templates. For more information about hash tables in Windows PowerShell, type: Get-Help about_Hash_Tables (http://go.microsoft.com/fwlink/?LinkID=324844). hashtable @@ -12994,51 +12694,7 @@ Properties : {[name, ContosoWeb], [state, Running], [hostNames, These commands create the ContosoWeb Azure website in the CRG01 resource group. - The first command creates a hash table of web site properties and saves it in the $WebsiteProperties variable. To find the properties that you can set for an Azure web site, use a gallery template, such as the ones that the Get-AzureRmResourceGroupGalleryTemplate cmdlet return.The second command uses the New-AzureRmResource cmdlet to create the web site. The value of the PropertyObject parameter is the hash table in the $WebsiteProperties variable. - - - - - - - - - - - -------------------------- Example 3: Add a website to a resource group -------------------------- - - PS C:\> - - PS C:\>New-AzureRmResourceGroup -Name ContosoPortal -Location "West US" -GalleryTemplateIdentity WordPress.WordPress.0.1.0-preview1 -TemplateParameterFile ".\WordPressParameters.json" - - -PS C:\>New-AzureRmResource –Name sqldb03 –ResourceType "Microsoft.Sql/servers/databases" –ResourceGroup ContosoPortal –Location "West US" –ParentResource "Microsoft.Sql/servers/ContosoServer01" –PropertyObject @{Edition = "Enterprise"; MaxSizeGB = 100} - - This example shows a typical use of this cmdlet. The first command uses the New-AzureRmResourceGroup cmdlet to create the ContosoPortal resource group. The command uses the WordPress gallery template (Get-AzureRmResourceGroupGalleryTemplate) and a JSON file, WordPressParameters.json, to specify values for the template-specific parameters, such as the name and location of the database, a name for the hosting plan, and web deployment credentials. - - - The second command uses the New-AzureRmResource cmdlet to add an additional database to the ContosoPortal resource group. The command uses the PropertyObject parameter to specify a hash table of values for the Edition and MaxSizeGB properties of the new database. For the other databases in the resource group, these values were specified in the PortalParameters.rgcfg resource group configuration file. - - - - - - - - - - - -------------------------- Example 4: Create a resource group with tags -------------------------- - - PS C:\> - - PS C:\>New-AzureRmResource -Name ContosoEngSite -Location "North Europe" -ResourceGroupName ContosoEngineering -ResourceType "Microsoft.Web/sites" -ApiVersion 2004-04-01 -Tag @{Name="Status";Value="Approved"},@{Name="New"} - - This command creates a new website and applies two tags to it. The command uses the Tag parameter to apply a "Status" tag with a value of "Approved" and a tag named "New" with no value. - - - - + The first command creates a hash table of web site properties and saves it in the $WebsiteProperties variable. To find the properties that you can set for an Azure web site, use a gallery template. The second command uses the New-AzureRmResource cmdlet to create the web site. The value of the PropertyObject parameter is the hash table in the $WebsiteProperties variable.