Skip to content

Latest commit

 

History

History
59 lines (41 loc) · 2.43 KB

powershell-create-service.md

File metadata and controls

59 lines (41 loc) · 2.43 KB
title titleSuffix description services author ms.service ms.topic ms.date ms.author ms.custom
PowerShell script sample - Create an Azure App Configuration store
Azure App Configuration
Create an Azure App Configuration store using a sample PowerShell script. See reference article links to commands used in the script.
azure-app-configuration
maud-lv
azure-app-configuration
sample
04/12/2024
malev
devx-track-azurepowershell

Create an Azure App Configuration store with PowerShell

This sample script creates a new instance of Azure App Configuration in a new resource group using PowerShell.

[!INCLUDE quickstarts-free-trial-note]

To execute the sample scripts, you need a functional setup of Azure PowerShell.

Open a PowerShell window with admin rights and run Install-Module -Name Az to install Azure PowerShell

Sample script

# Create a resource group 
New-AzResourceGroup -Name <resource-group-name> -Location <location>

# Create an App Configuration store
New-AzAppConfigurationStore -Name <store-name> -ResourceGroupName <resource-group-name> -Location <location> -Sku <sku>

# Get the App Configuration connection string 
Get-AzAppConfigurationStoreKey -Name <store-name> -ResourceGroupName <resource-group-name>

Clean up resources

Clean up the resources you deployed by deleting the resource group.

Remove-AzResourceGroup -Name <resource-group-name> 

Script explanation

This script uses the following commands to create a new resource group and an App Configuration store. Each command in the table links to command specific documentation.

Command Notes
New-AzResourceGroup Creates a resource group in which all resources are stored.
New-AzAppConfigurationStore Creates an App Configuration store resource.
Get-AzAppConfigurationStoreKey Lists access keys for an App Configuration store.

Next steps

For more information about Azure PowerShell, check out the Azure PowerShell documentation.

More App Configuration script samples for PowerShell can be found in the Azure App Configuration PowerShell samples.