Skip to content

Commit 8a3c211

Browse files
author
Alexander (Sasha) Nosov
committed
Fixed readme
1 parent f7c025d commit 8a3c211

File tree

2 files changed

+35
-12
lines changed
  • samples/manage/azure-arc-enabled-sql-server

2 files changed

+35
-12
lines changed

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

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ If not specified, all subscriptions your role has access to are scanned.
1919

2020
- You must have at least a *Contributor* role in each subscription you modify.
2121
- The Azure extension for SQL Server is updated to version 1.1.2230.58 or newer.
22+
- You must be connected to Azure AD and logged in to your Azure account. If your account have access to multiple tenants, make sure to log in with a specific tenant ID.
23+
2224

2325
# Launching the script
2426

@@ -67,13 +69,19 @@ This option is recommended because Cloud shell has the Azure PowerShell modules
6769

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

70-
2. Upload the script to your cloud shell using the following command:
72+
1. Connect to Azure AD
73+
74+
```console
75+
Connect-AzureAD
76+
```
77+
78+
1. Upload the script to your cloud shell using the following command:
7179

7280
```console
7381
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
7482
```
7583

76-
3. Run the script.
84+
1. Run the script.
7785

7886
```console
7987
.//modify-license-type.ps1 -LicenseType Paid
@@ -107,10 +115,11 @@ Use the following steps to run the script in a PowerShell session on your PC.
107115
Install-Module Az -Scope CurrentUser -Repository PSGallery -Force
108116
```
109117

110-
1. Connect to Azure with an authenticated account using an authentication method of your choice. For more information, see [Connect-AzAccount](https://learn.microsoft.com/powershell/module/az.accounts/connect-azaccount).
118+
1. Connect to Azure AD and log in to your Azure account.
111119

112120
```console
113-
Connect-AzAccount <parameters>
121+
Connect-AzureAD
122+
Connect-AzAccount -TenantID (Get-AzureADTenantDetail).ObjectId
114123
```
115124

116125
1. Run the script using the desired scope.

samples/manage/azure-arc-enabled-sql-server/uninstall-azure-extension-for-sql-server/README.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ You can specify a single subscription to scan, or provide a list of subscription
1717

1818
- You must have at least a *Contributor* role in each subscription you modify.
1919
- The Azure extension for SQL Server is updated to version 1.1.2230.58 or newer.
20+
- You must be connected to Azure AD and logged in to your Azure account. If your account have access to multiple tenants, make sure to log in with a specific tenant ID.
2021

21-
# Launching the script
22+
# Launching the script
2223

2324
The script accepts the following command line parameters:
2425

@@ -39,7 +40,7 @@ Get-AzSubscription | Export-Csv .\mysubscriptions.csv -NoTypeInformation
3940
The following command will scan all the subscriptions to which the user has contributor access to, and uninstall Azure extension for SQL Server on all Arc-enabled servers where it is installed.
4041

4142
```PowerShell
42-
.\uninstall-azure-extension-for-sql-server.ps1 -All $True
43+
.\uninstall-azure-extension-for-sql-server.ps1 -SubId ALL
4344
```
4445

4546
## Example 2
@@ -57,23 +58,36 @@ The following command will scan resource group <resource_group_name> in the subs
5758
```PowerShell
5859
.\uninstall-azure-extension-for-sql-server.ps1 -SubId <sub_id> -ResourceGroup <resource_group_name>
5960
```
61+
## Example 4
62+
63+
The following command will uninstall Azure extension for SQL Server on a specific Arc-enabled server.
64+
65+
```PowerShell
66+
.\uninstall-azure-extension-for-sql-server.ps1 -SubId <sub_id> -MachineName <machine_name>
67+
```
6068

6169
# Running the script using Cloud Shell
6270

6371
This option is recommended because Cloud shell has the Azure PowerShell modules pre-installed and you are automatically authenticated. Use the following steps to run the script in Cloud Shell.
6472

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

67-
2. Upload the script to your cloud shell using the following command:
75+
1. Connect to Azure AD
76+
77+
```console
78+
Connect-AzureAD
79+
```
80+
81+
1. Upload the script to your cloud shell using the following command:
6882

6983
```console
7084
curl https://raw.githubusercontent.com/microsoft/sql-server-samples/master/samples/manage/azure-arc-enabled-sql-server/uninstall-azure-extension-for-sql-server/uninstall-azure-extension-for-sql-server.ps1 -o uninstall-azure-extension-for-sql-server.ps1
7185
```
7286

73-
3. Run the script.
87+
1. Run the script.
7488

7589
```console
76-
.\uninstall-azure-extension-for-sql-server.ps1 -All $True
90+
.\uninstall-azure-extension-for-sql-server.ps1 -SubId ALL
7791
```
7892

7993
> [!NOTE]
@@ -82,7 +96,6 @@ This option is recommended because Cloud shell has the Azure PowerShell modules
8296

8397
# Running the script from a PC
8498

85-
8699
Use the following steps to run the script in a PowerShell session on your PC.
87100

88101
1. Copy the script to your current folder:
@@ -104,10 +117,11 @@ Use the following steps to run the script in a PowerShell session on your PC.
104117
Install-Module Az -Scope CurrentUser -Repository PSGallery -Force
105118
```
106119

107-
1. Connect to Azure with an authenticated account using an authentication method of your choice. For more information, see [Connect-AzAccount](https://learn.microsoft.com/powershell/module/az.accounts/connect-azaccount).
120+
1. Connect to Azure AD and login to your Azure account.
108121

109122
```console
110-
Connect-AzAccount <parameters>
123+
Connect-AzureAD
124+
Connect-AzAccount -TenantID (Get-AzureADTenantDetail).ObjectId
111125
```
112126

113127
1. Run the script using the desired scope.

0 commit comments

Comments
 (0)