Skip to content

Commit ae3dd94

Browse files
author
Alexander (Sasha) Nosov
committed
Replaced All with Force
1 parent 87b230b commit ae3dd94

File tree

1 file changed

+10
-10
lines changed
  • samples/manage/azure-arc-enabled-sql-server/modify-license-type

1 file changed

+10
-10
lines changed

samples/manage/azure-arc-enabled-sql-server/modify-license-type/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ services: Azure Arc-enabled SQL Server
33
platforms: Azure
44
author: anosov1960
55
ms.author: sashan
6-
ms.date: 2/16/2023
6+
ms.date: 6/4/2023
77
---
88

99

@@ -32,7 +32,7 @@ The script accepts the following command line parameters:
3232
|-ResourceGroup |resource_group_name|Optional: Limit the scope to a specific resource group|
3333
|-MachineName |machine_name|Optional: Limit the scope to a specific machine|
3434
|-LicenceType | "Paid", "PAYG" or "LicenseOnly"| Required: Specifies the license type value |
35-
|-All|\$True or \$False (default)|Optional. Set the new license type for all installed extensions. By default the value is set only if license type is undefined.|
35+
|-Force|\$True or \$False (default)|Optional. Set the new license type for all installed extensions. By default the value is set only if license type is undefined.|
3636

3737
<sup>1</sup>You can create a .csv file using the following command and then edit to remove the subscriptions you don't want to scan.
3838
```PowerShell
@@ -69,10 +69,10 @@ This option is recommended because Cloud shell has the Azure PowerShell modules
6969

7070
1. Launch the [Cloud Shell](https://shell.azure.com/). For details, [read more about PowerShell in Cloud Shell](https://aka.ms/pscloudshell/docs).
7171

72-
1. Connect to Azure AD
72+
1. Connect to Azure AD. You must specify `<tenant_id>` if you have access to more than one AAD tenants.
7373

7474
```console
75-
Connect-AzureAD
75+
Connect-AzureAD -TenantID <tenant_id>
7676
```
7777

7878
1. Upload the script to your cloud shell using the following command:
@@ -81,10 +81,10 @@ This option is recommended because Cloud shell has the Azure PowerShell modules
8181
curl https://raw.githubusercontent.com/microsoft/sql-server-samples/master/samples/manage/azure-arc-enabled-sql-server/modify-license-type/modify-license-type.ps1 -o modify-license-type.ps1
8282
```
8383

84-
1. Run the script.
84+
1. Run the script. The following command will set License Type to 'Paid" on all servers in all the subscriptions your role has access to.
8585

8686
```console
87-
./modify-license-type.ps1 -LicenseType Paid
87+
.//modify-license-type.ps1 -LicenseType Paid -Force $true
8888
```
8989

9090
> [!NOTE]
@@ -115,15 +115,15 @@ Use the following steps to run the script in a PowerShell session on your PC.
115115
Install-Module Az -Scope CurrentUser -Repository PSGallery -Force
116116
```
117117

118-
1. Connect to Azure AD and log in to your Azure account.
118+
1. Connect to Azure AD and log in to your Azure account. You must specify `<tenant_id>` if you have access to more than one AAD tenants.
119119

120120
```console
121-
Connect-AzureAD
121+
Connect-AzureAD -TenantID <tenant_id>
122122
Connect-AzAccount -TenantID (Get-AzureADTenantDetail).ObjectId
123123
```
124124

125-
1. Run the script using the desired scope.
125+
1. Run the script using the desired scope. The following command will set License Type to 'Paid" on all servers in the specified subscription.
126126

127127
```console
128-
.\modify-license-type.ps1 -LicenseType Paid
128+
.//modify-license-type.ps1 -SubId <sub_id> -LicenseType Paid -Force $true
129129
```

0 commit comments

Comments
 (0)