Use PowerShell to create a data share account in Azure

This PowerShell script creates a new Data Share account.

Sample script

# Set variables with your own values
$resourceGroupName = "<Resource group name"
$location = "<Location>"
$dataShareAccountName = "<Data share account name>"

# Create a new Azure Data Share account
New-AzDataShareAccount -ResourceGroupName $resourceGroupName -Name $dataShareAccountName -Location $location

Script explanation

This script uses the following commands:

Command Notes
New-AzDataShareAccount Creates a data share account.

Next steps

For more information on the Azure PowerShell, see Azure PowerShell documentation.

Additional Azure Data Share PowerShell script samples can be found in the Azure Data Share PowerShell samples.