Create a managed application definition with PowerShell
This script publishes a managed application definition to a service catalog.
If you don't have an Azure subscription, create an Azure free account before you begin.
Sample script
# Create resource group
New-AzResourceGroup -Name appDefinitionGroup -Location westcentralus
# Get Azure Active Directory group to manage the application
$groupid=(Get-AzADGroup -SearchString appManagers).Id
# Get role
$roleid=(Get-AzRoleDefinition -Name Owner).Id
# Create the definition for a managed application
New-AzManagedApplicationDefinition `
-Name "ManagedStorage" `
-Location "westcentralus" `
-ResourceGroupName appDefinitionGroup `
-LockLevel ReadOnly `
-DisplayName "Managed Storage Account" `
-Description "Managed Az.Storage Account" `
-Authorization "${groupid}:$roleid" `
-PackageFileUri "https://raw.githubusercontent.com/Azure/azure-managedapp-samples/master/Managed%20Application%20Sample%20Packages/201-managed-storage-account/managedstorage.zip"
Script explanation
This script uses the following command to create the managed application definition. Each command in the table links to command-specific documentation.
| Command | Notes |
|---|---|
| New-AzManagedApplicationDefinition | Create a managed application definition. Provide the package that contains the required files. |
Next steps
- For an introduction to managed applications, see Azure Managed Application overview.
- For more information on PowerShell, see Azure PowerShell documentation.