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-arc-enabled-sql-server/modify-license-type/README.md
+4-3Lines changed: 4 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 Arc-enabled SQL Server
3
3
platforms: Azure
4
4
author: anosov1960
5
5
ms.author: sashan
6
-
ms.date: 9/22/2023
6
+
ms.date: 12/01/2024
7
7
---
8
8
9
9
@@ -31,6 +31,7 @@ The script accepts the following command line parameters:
31
31
|-ResourceGroup |resource_group_name|Optional: Limits the scope to a specific resource group|
32
32
|-MachineName |machine_name|Optional: Limits the scope to a specific machine|
33
33
|-LicenseType | "Paid", "PAYG" or "LicenseOnly"| Optional: Sets the license type to the specified value |
34
+
|-UsePcoreLicense | "Yes", "No" | Optional. Enables unlimited virtualization license if the value is "Yes" or disables it if the value is "No". To enable, the license type must be "Paid" or "PAYG"|
34
35
|-EnableESU | "Yes", "No" | Optional. Enables the ESU policy the value is "Yes" or disables it if the value is "No". To enable, the license type must be "Paid" or "PAYG"|
35
36
|-Force||Optional. Forces the change of the license type to the specified value on all installed extensions. If -Force is not specified, the -LicenseType value is set only if undefined. Ignored if -LicenseType is not specified|
36
37
@@ -57,10 +58,10 @@ The following command will scan the subscription `<sub_id>` and set the license
57
58
58
59
## Example 3
59
60
60
-
The following command will scan resource group `<resource_group_name>` in the subscription `<sub_id>` and set the license type value to "PAYG" on all servers.
61
+
The following command will scan resource group `<resource_group_name>` in the subscription `<sub_id>` and set the license type value to "PAYG" and enable unlimited virtualization license on all servers in the specified resource group.
Copy file name to clipboardExpand all lines: samples/manage/azure-arc-enabled-sql-server/modify-license-type/modify-license-type.ps1
+22-4Lines changed: 22 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,15 @@
6
6
# If not specified, all subscriptions your role has access to are scanned.
7
7
#
8
8
# The script accepts the following command line parameters:
9
-
#
9
+
#.
10
10
# -SubId [subscription_id] | [csv_file_name] (Optional. Limits the scope to specific subscriptions. Accepts a .csv file with the list of subscriptions.
11
11
# If not specified all subscriptions will be scanned)
12
12
# -ResourceGroup [resource_goup] (Optional. Limits the scope to a specific resoure group)
13
13
# -MachineName [machine_name] (Optional. Limits the scope to a specific machine)
14
14
# -LicenseType [license_type_value] (Optional. Sets the license type to the specified value)
15
-
# -EnableESU [Yes or No] (Optional. Enables the ESU policy the value is "Yes" or disables it if the value is "No"
15
+
# -UsePcoreLicense [Yes or No] (Optional. Enables unlimited virtualization license if the value is "Yes" or disables it if the value is "No"
16
+
# To enable, the license type must be "Paid" or "PAYG"
17
+
# -EnableESU [Yes or No] (Optional. Enables the ESU policy if the value is "Yes" or disables it if the value is "No"
16
18
# To enable, the license type must be "Paid" or "PAYG"
17
19
# -Force (Optional. Forces the chnahge of the license type to the specified value on all installed extensions.
18
20
# If Force is not specified, the -LicenseType value is set only if undefined. Ignored if -LicenseType is not specified
@@ -34,6 +36,9 @@ param (
34
36
[string] $LicenseType,
35
37
[Parameter (Mandatory=$false)]
36
38
[ValidateSet("Yes","No", IgnoreCase=$false)]
39
+
[string] $UsePcoreLicense,
40
+
[Parameter (Mandatory=$false)]
41
+
[ValidateSet("Yes","No", IgnoreCase=$false)]
37
42
[string] $EnableESU,
38
43
[Parameter (Mandatory=$false)]
39
44
[switch] $Force
@@ -243,11 +248,24 @@ foreach ($sub in $subscriptions){
243
248
write-host"The configured license type does not support ESUs"
244
249
}
245
250
}
246
-
251
+
252
+
# Enable UsePcoreLicense for qualified license types or disable
253
+
if ($UsePcoreLicense) {
254
+
if (($settings["LicenseType"] |select-string"Paid","PAYG") -or ($UsePcoreLicense-eq"No")) {
0 commit comments