This Portion of Script will help you to perform the database maintenance in all your databases from your SQL Azure Server, if you want to skip a database, you can do it by filtering the Where condition.
-- Note: Maintenance SP AzureSQLMaintenance should exists on all the databases and also you need to adjust the parameters for the Execution. ..
$ServerInstance = 'ServerName.database.windows.net'
$Database = 'master'
$Cred = Get-AutomationPSCredential -Name "ConnectionName"
$Query = 'SELECT name FROM sys.databases'
$TargetTenants = Invoke-Sqlcmd -ServerInstance $ServerInstance -Database $Database -Username $Cred.UserName - Password $Cred.GetNetworkCredential().Password -Query $Query
$Query = 'exec AzureSQLMaintenance ''all'',''dummy'''
$TargetTenants | ForEach-Object{
$TargetTenant = $_.name
Invoke-Sqlcmd -ServerInstance $ServerInstance -Database $TargetTenant -UserName $Cred.UserName -Password $Cred.GetNetworkCredential().Password -Query $Query -Verbose
}