More PowerShell for the Azure World

The collection of Azure SQL Database cmdlets can be found at – There are alot, however I tend to use the following quite frequently and I am sure they will be useful to others too.


You can scale your database up or down with the Set-AzureRmSqlDatabase command – so let’s upgrade to Premium.

Set-AzureRmSqlDatabase -ResourceGroupName "MY_ENV"  -ServerName " azuresqlserver01"  -DatabaseName "SQLDB12" -Edition premium -RequestedServiceObjectiveName "P1"



Database list

Get-AzureRmSqlDatabase -ResourceGroupName "MY_ENV"  -ServerName " azuresqlserver01"

Information returned includes – server name, database name, collation, status, creation date and much more (see screen shot)


Get geo-replication information

Get-AzureRmSqlDatabaseReplicationLink -ResourceGroupName "MY_ENV" -ServerName " azuresqlserver01" -DatabaseName "SQLDB2" -PartnerResourceGroupName " MY_ENV"


Delete Database

Remove-AzureRmSqlDatabase -ResourceGroupName "MY_ENV" -ServerName " azuresqlserver01 " -DatabaseName "SQLDB12"


Then you can re-issue Get-AzureRmSqlDatabase -ResourceGroupName “MY_ENV” -ServerName ” azuresqlserver01″ Then you will notice that it has gone from the list.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s