Study guide

12.1 Azure PowerShell, Azure CLI, and Deployment Monitoring

DP-300: Administering Microsoft Azure SQL Solutions Exam

Track your progress as you read

Finished sections get a check mark.

1 Introduction & Exam Overview

1.1 Current DP-300 Exam Facts 1.2 Skills Outline and Domain Weights 1.3 Study Strategy and Official Resources

2 Planning and Deploying Azure SQL Solutions

2.1 Choosing and Deploying Azure SQL Database Offerings 2.2 Automated Deployment, Azure Arc, and SQL Database in Microsoft Fabric 2.3 Table Partitioning and Sharding Strategy 2.4 Hybrid SQL Server and IaaS Patching

3 Configuring Resources for Scale and Performance

3.1 Configuring Azure SQL Database for Scale and Performance 3.2 Configuring Azure SQL Managed Instance for Scale and Performance 3.3 Configuring SQL Server on Azure VMs for Scale and Performance 3.4 Configuring Table Partitioning and Data Compression

4 Planning and Implementing a Migration Strategy

4.1 Evaluating Migration Requirements and Strategies 4.2 Implementing Online, Offline, and Azure Migrations 4.3 Migrating Between Azure SQL Services and Troubleshooting

5 Configuring Database Authentication and Authorization

5.1 Microsoft Entra ID Authentication for Azure SQL 5.2 Authentication for SQL on Azure VMs and Managed Instance; Troubleshooting 5.3 Security Principals and Entra-Backed Users 5.4 Permissions, Least Privilege, and T-SQL Management

6 Implementing Security for Data at Rest and in Transit

6.1 Transparent Data Encryption and Object-Level Encryption 6.2 Always Encrypted and VBS Enclaves 6.3 Firewall Rules, Private Links, and Service Endpoints

7 Implementing Compliance Controls for Sensitive Data

7.1 Data Classification and Server/Database Auditing 7.2 Change Data Tracking and Dynamic Data Masking 7.3 Row-Level Security and Ledger in Azure SQL

8 Monitoring Resource Activity and Performance

8.1 Operational Baselines and Performance Metric Sources 8.2 Interpreting Metrics and Configuring Activity Monitoring 8.3 Monitoring with Database Watcher (Preview) 8.4 Monitoring with Extended Events

9 Monitoring and Optimizing Query Performance

9.1 Configuring and Monitoring with Query Store 9.2 Session Blocking and Dynamic Management Views 9.3 Index Changes and Execution Plan Review 9.4 Query Construct Modifications and Intelligent Insights

10 Configuring Database Solutions for Optimal Performance

10.1 Index, Statistics, and Integrity Maintenance 10.2 Automatic Tuning and Database-Scoped Configuration 10.3 Server Settings and Resource Governor 10.4 Compute/Storage Scaling and Intelligent Query Processing

11 Creating and Managing SQL Server Agent Jobs

11.1 Schedules for Regular Maintenance Jobs 11.2 Job Alerts, Notifications, and Agent Troubleshooting 11.3 Automating Deployment with ARM and Bicep Templates

12 Automating Deployments and Database Tasks in Azure

12.1 Azure PowerShell, Azure CLI, and Deployment Monitoring 12.2 Elastic Jobs for Cross-Database Automation 12.3 Azure Automation Runbooks, Alerts, and Troubleshooting Automated Tasks

13 Planning an HA/DR Strategy and Backup and Restore

13.1 Recommending HA/DR Strategy from RPO and RTO 13.2 Hybrid and Azure-Specific HA/DR Solutions and Testing 13.3 Backup and Restore Strategy with Native Tools 13.4 Point-in-Time Restore and Recovery Operations

14 Configuring HA/DR: Long-Term Retention, Geo-Replication, and Failover Groups

14.1 Long-Term Retention, T-SQL Backup/Restore, and Cloud Storage 14.2 Active Geo-Replication 14.3 Failover Groups

15 Advanced HA/DR: Availability Groups, FCIs, Log Shipping, and Troubleshooting

15.1 Always On Availability Groups on SQL Managed Instance and Azure VMs 15.2 Always On Failover Cluster Instances and Log Shipping 15.3 Monitoring and Troubleshooting HA/DR Solutions

12.1 Azure PowerShell, Azure CLI, and Deployment Monitoring

Key Takeaways Explain This Topic AI

The Az.Sql module cmdlets (New-AzSqlServer, New-AzSqlDatabase, Set-AzSqlDatabase, New-AzSqlElasticPool) provision and manage Azure SQL; Azure CLI mirrors them with az sql server create, az sql db create, and az sql db update

Choose Azure PowerShell for Windows/PowerShell ecosystems and rich object pipelines; choose Azure CLI for cross-platform Bash, Linux CI runners, or Cloud Shell one-liners

Connect-AzAccount and az login support interactive, service-principal, and managed-identity auth; service principals fit headless CI/CD, managed identities fit Azure-hosted runbooks

Deployment failures are diagnosed through Get-AzDeployment or az deployment group show plus activity-log and deployment operations filtered by correlationId; common causes are quota, names, region/SKU, NSG, and locks

Use -Force to suppress confirmation prompts in scripts, wrap cmdlets in try/catch, and use -AsJob for long-running deployments so the script can poll rather than block

Last updated: August 2026

Why PowerShell and CLI Matter for DP-300

Domain 4 of the DP-300 exam ("Configure and manage automation of tasks", weighted 15-20%) explicitly tests your ability to automate deployment by using Azure PowerShell and automate deployment by using Azure CLI , and to monitor and troubleshoot deployments . You will not be asked to memorize every flag, but you must recognize the right cmdlet or command for a scenario, know how to authenticate a script non-interactively, and know where to look when a deployment fails. Treat this section as the scripting vocabulary you need to read and write infrastructure-as-code for Azure SQL.

The Az.Sql Module: Core Cmdlets

Azure PowerShell organizes SQL management in the Az.Sql module. The verbs follow PowerShell's standard verb-noun convention, so once you internalize a handful of verbs you can predict most cmdlets. The table below covers the ones the exam draws from:

Cmdlet Purpose Common parameters

New-AzSqlServer Create a logical server -ResourceGroupName, -ServerName, -Location, -SqlAdministratorCredentials

New-AzSqlDatabase Create a database on a server -ServerName, -DatabaseName, -RequestedServiceObjectiveName / -Edition / -VCore

Get-AzSqlDatabase Retrieve a database object -ServerName, -DatabaseName, -ResourceGroupName

Set-AzSqlDatabase Modify a database (scale tier, rename, move pool) -DatabaseName, -Edition, -VCore, -ElasticPoolName

  • New-AzSqlElasticPool Create an elastic pool -ElasticPoolName, -Edition, -Dtu / -VCore
  • Set-AzSqlElasticPool Resize an elastic pool -VCore, -DatabaseDtuMin, -DatabaseDtuMax
  • New-AzSqlDatabaseCopy Create a geo-secondary or copy -CopyResourceGroupName, -PartnerServerName
  • Get-AzSqlDatabaseActivity Watch an async database operation -DatabaseName, -State

Two operational facts are worth highlighting. First, New-AzSqlServer requires credentials for the server admin in PSCredential form (a username plus a strongly typed SecureString password), so the usual pattern is $cred = Get-Credential interactively or constructed from a stored secret in automation. Second, scaling a database is a Set-AzSqlDatabase call with the new service objective - it is an online operation that ends in a brief connection drop, exactly as covered in Chapter 3.

Azure CLI: az sql Commands

The Azure CLI exposes the same operations through the az sql command group, which is cross-platform (Windows, macOS, Linux) and especially at home in Bash and CI pipelines. The core commands:

  • Command Purpose
  • az sql server create --name --resource-group --location --admin-user --admin-password Create a logical server
  • az sql server show / list / update Retrieve or modify a server
  • az sql db create --server --name --resource-group --service-objective Create a database at a given SKU
  • az sql db show / list / update Inspect or modify a database
  • az sql db update --service-objective GP_Gen5_8 Scale a database
  • az sql elastic-pool create / update Create or resize an elastic pool
  • az sql server firewall-rule create / update Manage server-level firewall rules

Service objective names ( GP_Gen5_8 , BC_Gen5_16 , HS_Gen5_2 , S3 , P1 ) are the same string vocabulary the cmdlets and T-SQL ALTER DATABASE accept. A typical one-liner: az sql db create \

  • -resource-group rg-sql --server sql-prod \
  • -name SalesDB --service-objective GP_Gen5_4
  • PowerShell vs CLI: Selection Criteria

The exam will present scenarios that lean toward one tool. Use this decision table:

  • Criterion Pick PowerShell Pick CLI
  • Existing Windows / PowerShell ecosystem, staff skill Yes
  • Object pipeline, rich .NET objects in variables Yes
  • Linux/macOS developers, Bash heredocs, jq Yes
  • Cross-platform CI runners (GitHub Actions on ubuntu-latest) Yes
  • Cloud Shell one-liners you can paste from docs Either Either
  • DSC, Azure Policy guest config integrations Yes

Both tools are first-class and idempotent when you add -Force (PowerShell) or run create commands that return the existing resource if it already exists. Neither is deprecated; the exam does not penalize choosing either, only choosing the wrong authentication or the wrong cmdlet for a scenario.