Skip to content

Add Azure SQL Database and SQL Managed Instance PowerShell sample scripts#58

Merged
mikefrobbins merged 1 commit into
Azure-Samples:mainfrom
MashaMSFT:202606_sqlpsmigrate
Jun 17, 2026
Merged

Add Azure SQL Database and SQL Managed Instance PowerShell sample scripts#58
mikefrobbins merged 1 commit into
Azure-Samples:mainfrom
MashaMSFT:202606_sqlpsmigrate

Conversation

@MashaMSFT

@MashaMSFT MashaMSFT commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds 11 refreshed Azure SQL Database and Azure SQL Managed Instance PowerShell sample scripts so the Microsoft Learn articles can reference them from this repo instead of carrying the scripts inline.

These scripts were previously hosted in the archived Azure/azure-docs-powershell-samples repo. This change brings the refreshed versions into the active Azure-Samples/azure-docs-powershell-samples repo under the azure-sql/ structure, each wrapped in # <FullScript> / # </FullScript> markers so articles can reference them with :::code ... id="FullScript":::.

Changes

Add Azure SQL DB and MI PowerShell sample scripts (11 files, +1249/-149)

Database scripts (azure-sql/database/):

1. failover-groups/add-elastic-pool-to-failover-group-az-ps.ps1 (updated)

  • Refreshed to the splatting-based style; creates a database, adds it to an elastic pool, creates a failover group, and tests failover

2. copy-database-to-new-server/copy-database-to-new-server-az-ps.ps1

  • Copies a database to a new logical server

3. create-and-configure-database/create-and-configure-database-az-ps.ps1

  • Creates and configures a single database

4. import-from-bacpac/import-from-bacpac-az-ps.ps1

  • Imports a BACPAC file into a new database

5. monitor-and-scale-database/monitor-and-scale-database-az-ps.ps1

  • Monitors and scales a single database

6. monitor-and-scale-pool/monitor-and-scale-pool-az-ps.ps1

  • Monitors and scales an elastic pool

7. move-database-between-pools-and-standalone/move-database-between-pools-and-standalone-az-ps.ps1

  • Moves a database between elastic pools and standalone

8. restore-database/restore-database-az-ps.ps1

  • Restores an automatic backup of a database

9. setup-geodr-and-failover/setup-geodr-and-failover-single-database-az-ps.ps1

  • Configures active geo-replication for a single database and fails over

10. setup-geodr-and-failover/setup-geodr-and-failover-elastic-pool-az-ps.ps1

  • Configures active geo-replication for an elastic pool and fails over

Managed Instance scripts (azure-sql/managed-instance/):

11. transparent-data-encryption/setup-tde-byok-sqlmi-az-ps.ps1

  • Sets up bring-your-own-key (BYOK) transparent data encryption for SQL Managed Instance

Source and validation

  • Script content was taken from the reviewed, refreshed versions in MicrosoftDocs/sql-docs-pr#37419 (which had inlined them) and wrapped in # <FullScript> markers.
  • Each script uses placeholder values (<Subscription-ID>, etc.) and follows the existing repo conventions.

Related

  • Companion docs PR: MicrosoftDocs/sql-docs-pr#37460 updates the articles to reference these scripts (must merge after this PR).
  • Supersedes the inline-script approach in MicrosoftDocs/sql-docs-pr#37419.

@MashaMSFT MashaMSFT changed the title Add Azure SQL Database and Managed Instance PowerShell sample scripts Add Azure SQL Database and SQL Managed Instance PowerShell sample scripts Jun 17, 2026

@mikefrobbins mikefrobbins left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mikefrobbins mikefrobbins merged commit 50f0556 into Azure-Samples:main Jun 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants