Quickstart: Create a server - PowerShell

This quickstart describes using PowerShell from the command line to create an Azure Analysis Services server in your Azure subscription.

Prerequisites

Note

We recommend that you use the Azure Az PowerShell module to interact with Azure. See Install Azure PowerShell to get started. To learn how to migrate to the Az PowerShell module, see Migrate Azure PowerShell from AzureRM to Az.

Import Az.AnalysisServices module

To create a server in your subscription, you use the Az.AnalysisServices module. Load the Az.AnalysisServices module into your PowerShell session.

Import-Module Az.AnalysisServices

Sign in to Azure

Sign in to your Azure subscription by using the Connect-AzAccount -Environment AzureChinaCloud command. Follow the on-screen directions.

Connect-AzAccount -Environment AzureChinaCloud

Create a resource group

An Azure resource group is a logical container where Azure resources are deployed and managed as a group. When you create your server, you must specify a resource group in your subscription. If you do not already have a resource group, you can create a new one by using the New-AzResourceGroup command. The following example creates a resource group named myResourceGroup in the China North region.

New-AzResourceGroup -Name "myResourceGroup" -Location "chinanorth"

Create a server

Create a new server by using the New-AzAnalysisServicesServer command. The following example creates a server named myServer in myResourceGroup, in the ChinaNorth region, at the B0 tier, and specifies philipc@adventureworks.com as a server administrator.

New-AzAnalysisServicesServer -ResourceGroupName "myResourceGroup" -Name "myserver" -Location chinanorth -Sku B0 -Administrator "philipc@adventure-works.com"

Clean up resources

You can remove the server from your subscription by using the Remove-AzAnalysisServicesServer command. If you continue with other quickstarts and tutorials in this collection, do not remove your server. The following example removes the server created in the previous step.

Remove-AzAnalysisServicesServer -Name "myserver" -ResourceGroupName "myResourceGroup"

Next steps

In this quickstart, you learned how to create a server in your Azure subscription by using PowerShell. Now that you have server, you can help secure it by configuring an (optional) server firewall. You can also add a basic sample data model to your server right from the portal. Having a sample model is helpful when learning about configuring model database roles and testing client connections. To learn more, continue to the tutorial for adding a sample model.