You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: samples/manage/azure-hybrid-benefit/modify-license-type/README.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ services: Azure SQL
3
3
platforms: Azure
4
4
author: anosov1960,rodrigomonteiro-gbb
5
5
ms.author: sashan.romontei
6
-
ms.date: 06/21/2025
6
+
ms.date: 10/13/2025
7
7
---
8
8
9
9
# About this sample
@@ -22,12 +22,14 @@ ms.date: 06/21/2025
22
22
23
23
06/10/2025 - Fixed a RG filter for SQL DB
24
24
25
+
10/13/2025 - blocked modification of the DR replica
26
+
25
27
26
28
# Overview
27
29
28
30
This script provides a scaleable solution to change the license type of various Azure SQL resources within the selected scope. It automates the process of modifying license settings for SQL Databases, Elastic Pools, SQL Managed Instances, SQL Instance Pools, SQL Virtual Machines, and DataFactory SSIS Integration Runtimes. The script supports targeting a single subscription, a list of subscriptions defined in a CSV file, or all accessible subscriptions. Optionally, it can also start resources that are stopped (if the -ForceStartOnResources parameter is enabled).
29
31
30
-
This script is designed to help administrators standardize SQL licensing across their Azure environment by automating license updates. It accepts a subscription ID or CSV file (for a list of subscriptions). If no subscription is specified, it defaults to updating resources in all accessible subscriptions.
32
+
This script is designed to help administrators standardize SQL licensing across their Azure environment by automating license updates. It accepts a subscription ID or CSV file (for a list of subscriptions). If no subscription is specified, it defaults to updating resources in all accessible subscriptions. The update will preserve the existing configuration of the passive replicas with failover rights (with License type value set to "DR").
31
33
32
34
# Target Resource Types
33
35
@@ -70,13 +72,14 @@ The scripts is seamlessly integrated with Azure Authentication. It uses managed
70
72
|`-SubId`|`subscription_id`*or* a file_name|Optional: Subscription id or a .csv file with the list of subscriptions<sup>1</sup>. If not specified all subscriptions will be scanned|
71
73
|`-ResourceGroup`|`resource_group_name`|Optional: Limits the scope to a specific resource group|
72
74
|`-ResourceName`|`resource_name`|Optional: Limits the scope to resources associated with this name. For SQL Server - updates all databases under the specified server. For SQL Managed Instance - updates the specified instance. For SQL VM - updates the specified VM |
73
-
|`-LicenseType`|`LicenseIncluded` (default) or `BasePrice`| Optional: Sets the license type to the specified value |
75
+
|`-LicenseType`|`LicenseIncluded` (default) or `BasePrice`| Optional: Sets the license type to the specified value<sup>2</sup>|
74
76
|`-ExclusionTags`|`'{"tag1":"value1","tag2":"value2"}'`|*Optional*. If specified, excludes the resources that have these tags assigned.|
75
77
|`-TenantId`|`tenant_id`|*Optional*. If specified, uses this tenant id to log in. Otherwise, the current context is used.|
76
78
|`-ReportOnly`||*Optional*. If true, generates a csv file with the list of resources that are to be modified, but doesn't make the actual change.|
77
79
|`-UseManagedIdentity`||*Optional*. If true, logs in both PowerShell and CLI using managed identity. Required to run the script as a runbook.|
78
80
79
81
<sup>1</sup>You can generate a .csv file that lists only specific subscriptions. E.g., the following command will include only production subscriptions (exclude dev/test).
0 commit comments