A2oz

How Do I Create a Batch Account in Azure?

Published in Azure Services 2 mins read

You can create an Azure Batch account through the Azure portal, Azure CLI, or Azure PowerShell.

Creating a Batch Account Through the Azure Portal

  1. Log in to the Azure portal.
  2. Navigate to the "Create a resource" button.
  3. Search for "Batch Account" and select it.
  4. Fill out the necessary information, including:
    • Subscription: Choose the Azure subscription you want to use.
    • Resource group: Select an existing resource group or create a new one.
    • Batch account name: Enter a unique name for your Batch account.
    • Location: Choose the Azure region where you want to create your Batch account.
    • Storage account: Select an existing storage account or create a new one.
    • Virtual network: (Optional) If you want to use a virtual network, select an existing virtual network or create a new one.
  5. Review and create your Batch account.

Creating a Batch Account Through Azure CLI

  1. Open a terminal or command prompt.
  2. Log in to your Azure account using the Azure CLI.
  3. Use the following command to create a Batch account:
az batch account create --name <batch-account-name> --resource-group <resource-group-name> --location <location> --storage-account <storage-account-name> --tags <key1>=<value1>,<key2>=<value2>

Replace the placeholders with your actual values.

Creating a Batch Account Through Azure PowerShell

  1. Open a PowerShell console.
  2. Log in to your Azure account using Azure PowerShell.
  3. Use the following command to create a Batch account:
New-AzBatchAccount -Name <batch-account-name> -ResourceGroupName <resource-group-name> -Location <location> -StorageAccountName <storage-account-name> -Tags @{key1="value1"; key2="value2"}

Replace the placeholders with your actual values.

Practical Insights

  • You can use the same storage account for multiple Batch accounts.
  • You can create multiple Batch accounts in the same region.
  • You can use the Batch account to run your jobs on a variety of virtual machine sizes.
  • You can use the Batch account to manage your jobs and tasks.

Related Articles