Summary: Use Windows PowerShell to get Windows Azure database.

Hey, Scripting Guy! Question How can I use Windows PowerShell to get my Windows Azure database?

Hey, Scripting Guy! Answer 1. Run the Add-AzureAccount cmdlet to refresh the account information in your Windows PowerShell session
          (expires in 12 hours).

          2. Run Get-AzureSqlDatabaseServer to get the database server in your account. Your SQL Server
          databases are associated with your database server.

          3. Run Get-AzureSqlDatabase for the databases that are associated with your database servers.

 

PS C:\> Add-AzureAccount  #Prompts for credentials

PS C:\ > Get-AzureSqlDatabaseServer

 

ServerName                              Location                                AdministratorLogin

----------                              --------                                ------------------

begood2014                              West US                                 juneb

 

PS C:\> Get-AzureSqlDatabase –ServerName begood2014

 

Name                                       : master

CollationName                              : SQL_Latin1_General_CP1_CI_AS

Edition                                    : Web

MaxSizeGB                                  : 5

ServiceObjectiveName                       :

ServiceObjectiveAssignmentStateDescription : Complete

CreationDate                               : 12/13/2013 11:28:43 AM

 

Name                                       : appdb

CollationName                              : SQL_Latin1_General_CP1_CI_AS

Edition                                    : Web

MaxSizeGB                                  : 1

ServiceObjectiveName                       :

ServiceObjectiveAssignmentStateDescription : Complete

CreationDate                               : 12/13/2013 11:30:54 AM

 

Name                                       : memberdb

CollationName                              : SQL_Latin1_General_CP1_CI_AS

Edition                                    : Web

MaxSizeGB                                  : 1

ServiceObjectiveName                       :

ServiceObjectiveAssignmentStateDescription : Complete

CreationDate                               : 12/13/2013 11:31:17 AM