Skip to content

Commit 3335650

Browse files
Merge pull request #285270 from mbrat2005/mtb-basic-lb-upgrade-updated-instructions
simplified module setup instructions
2 parents 2de6633 + d1ed0ef commit 3335650

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

articles/load-balancer/upgrade-basic-standard-with-powershell.md

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,13 @@ The PowerShell module performs the following functions:
6464
### Prerequisites
6565

6666
- **PowerShell**: A supported version of PowerShell version 7 or higher is recommended for use with the AzureBasicLoadBalancerUpgrade module on all platforms including Windows, Linux, and macOS. However, PowerShell 5.1 on Windows is supported.
67-
- **Az PowerShell Module**: Determine whether you have the latest Az PowerShell module installed
68-
- Install the latest [Az PowerShell module](/powershell/azure/install-azure-powershell)
69-
- **Az.ResourceGraph PowerShell Module**: The Az.ResourceGraph PowerShell module is used to query resource configuration during upgrade and is a separate install from the Az PowerShell module. It is automatically added if you install the `AzureBasicLoadBalancerUpgrade` module using the `Install-Module` command.
7067

7168
### Module Installation
7269

73-
Install the module from [PowerShell gallery](https://www.powershellgallery.com/packages/AzureBasicLoadBalancerUpgrade)
70+
Install the module from [PowerShell Gallery](https://www.powershellgallery.com/packages/AzureBasicLoadBalancerUpgrade)
7471

7572
```powershell
76-
PS C:\> Install-Module -Name AzureBasicLoadBalancerUpgrade -Scope CurrentUser -Repository PSGallery -Force
73+
Install-Module -Name AzureBasicLoadBalancerUpgrade -Scope CurrentUser -Repository PSGallery -Force
7774
```
7875

7976
## Pre- and Post-migration Steps
@@ -96,10 +93,10 @@ PS C:\> Install-Module -Name AzureBasicLoadBalancerUpgrade -Scope CurrentUser -R
9693

9794
## Use the module
9895

99-
1. Use `Connect-AzAccount` to connect to Azure, specifying the Basic Load Balancer's subscription ID if you have more than one subscription.
96+
1. Ensure you have selected the Basic Load Balancer's subscription ID by running `Select-AzSubscription`.
10097

10198
```powershell
102-
PS C:\> Connect-AzAccount -Subscription <SubscriptionId>
99+
Select-AzSubscription -Subscription <SubscriptionId>
103100
```
104101
105102
2. Find the Load Balancer you wish to upgrade. Record its name and resource group name.
@@ -113,46 +110,46 @@ PS C:\> Install-Module -Name AzureBasicLoadBalancerUpgrade -Scope CurrentUser -R
113110
>[!TIP]
114111
>Additional parameters for advanced and recovery scenarios can be viewed by running `Get-Help Start-AzBasicLoadBalancerUpgrade -Detailed`
115112
116-
4. Run the Upgrade command.
113+
4. Run the `Start-AzBasicLoadBalancerUpgrade` command, using the following examples for guidance.
117114
118115
### Example: validate a scenario
119116
120117
Validate that a Basic Load Balancer is supported for upgrade
121118
122119
```powershell
123-
PS C:\> Start-AzBasicLoadBalancerUpgrade -ResourceGroupName <loadBalancerRGName> -BasicLoadBalancerName <basicLBName> -validateScenarioOnly
120+
Start-AzBasicLoadBalancerUpgrade -ResourceGroupName <loadBalancerRGName> -BasicLoadBalancerName <basicLBName> -validateScenarioOnly
124121
```
125122

126123
### Example: upgrade by name
127124

128125
Upgrade a Basic Load Balancer to a Standard Load Balancer with the same name, providing the Basic Load Balancer name and resource group name
129126

130127
```powershell
131-
PS C:\> Start-AzBasicLoadBalancerUpgrade -ResourceGroupName <loadBalancerRGName> -BasicLoadBalancerName <basicLBName>
128+
Start-AzBasicLoadBalancerUpgrade -ResourceGroupName <loadBalancerRGName> -BasicLoadBalancerName <basicLBName>
132129
```
133130

134131
### Example: upgrade, change name, and show logs
135132

136133
Upgrade a Basic Load Balancer to a Standard Load Balancer with the specified name, displaying logged output on screen
137134

138135
```powershell
139-
PS C:\> Start-AzBasicLoadBalancerUpgrade -ResourceGroupName <loadBalancerRGName> -BasicLoadBalancerName <basicLBName> -StandardLoadBalancerName <newStandardLBName> -FollowLog
136+
Start-AzBasicLoadBalancerUpgrade -ResourceGroupName <loadBalancerRGName> -BasicLoadBalancerName <basicLBName> -StandardLoadBalancerName <newStandardLBName> -FollowLog
140137
```
141138

142139
### Example: upgrade with alternate backup path
143140

144141
Upgrade a Basic Load Balancer to a Standard Load Balancer with the specified name and store the Basic Load Balancer backup file at the specified path
145142

146143
```powershell
147-
PS C:\> Start-AzBasicLoadBalancerUpgrade -ResourceGroupName <loadBalancerRGName> -BasicLoadBalancerName <basicLBName> -StandardLoadBalancerName <newStandardLBName> -RecoveryBackupPath C:\BasicLBRecovery
144+
Start-AzBasicLoadBalancerUpgrade -ResourceGroupName <loadBalancerRGName> -BasicLoadBalancerName <basicLBName> -StandardLoadBalancerName <newStandardLBName> -RecoveryBackupPath C:\BasicLBRecovery
148145
```
149146

150147
### Example: validate completed migration
151148

152149
Validate a completed migration by passing the Basic Load Balancer state file backup and the Standard Load Balancer name
153150

154151
```powershell
155-
PS C:\> Start-AzBasicLoadBalancerUpgrade -validateCompletedMigration -StandardLoadBalancerName <newStandardLBName> -basicLoadBalancerStatePath C:\RecoveryBackups\State_mybasiclb_rg-basiclbrg_20220912T1740032148.json
152+
Start-AzBasicLoadBalancerUpgrade -validateCompletedMigration -StandardLoadBalancerName <newStandardLBName> -basicLoadBalancerStatePath C:\RecoveryBackups\State_mybasiclb_rg-basiclbrg_20220912T1740032148.json
156153
```
157154

158155
### Example: migrate multiple, related Load Balancers
@@ -161,7 +158,7 @@ Migrate multiple Load Balancers with shared backend members at the same time, us
161158

162159
```powershell
163160
# build array of multiple basic load balancers
164-
PS C:\> $multiLBConfig = @(
161+
$multiLBConfig = @(
165162
@{
166163
'standardLoadBalancerName' = 'myStandardInternalLB01' # specifying the standard load balancer name is optional
167164
'basicLoadBalancer' = (Get-AzLoadBalancer -ResourceGroupName myRG -Name myBasicInternalLB01)
@@ -172,23 +169,23 @@ PS C:\> $multiLBConfig = @(
172169
}
173170
)
174171
# pass the array of load balancer configurations to the -MultiLBConfig parameter
175-
PS C:\> Start-AzBasicLoadBalancerUpgrade -MultiLBConfig $multiLBConfig
172+
Start-AzBasicLoadBalancerUpgrade -MultiLBConfig $multiLBConfig
176173
```
177174

178175
### Example: retry failed virtual machine scale set migration
179176

180177
Retry a failed upgrade for a virtual machine scale set's load balancer (due to error or script termination) by providing the Basic Load Balancer and Virtual Machine Scale Set backup state file
181178

182179
```powershell
183-
PS C:\> Start-AzBasicLoadBalancerUpgrade -FailedMigrationRetryFilePathLB C:\RecoveryBackups\State_mybasiclb_rg-basiclbrg_20220912T1740032148.json -FailedMigrationRetryFilePathVMSS C:\RecoveryBackups\VMSS_myVMSS_rg-basiclbrg_20220912T1740032148.json
180+
Start-AzBasicLoadBalancerUpgrade -FailedMigrationRetryFilePathLB C:\RecoveryBackups\State_mybasiclb_rg-basiclbrg_20220912T1740032148.json -FailedMigrationRetryFilePathVMSS C:\RecoveryBackups\VMSS_myVMSS_rg-basiclbrg_20220912T1740032148.json
184181
```
185182

186183
### Example: retry failed virtual machine migration
187184

188185
Retry a failed upgrade for a VM load balancer (due to error or script termination) by providing the Basic Load Balancer backup state file
189186

190187
```powershell
191-
PS C:\> Start-AzBasicLoadBalancerUpgrade -FailedMigrationRetryFilePathLB C:\RecoveryBackups\State_mybasiclb_rg-basiclbrg_20220912T1740032148.json
188+
Start-AzBasicLoadBalancerUpgrade -FailedMigrationRetryFilePathLB C:\RecoveryBackups\State_mybasiclb_rg-basiclbrg_20220912T1740032148.json
192189
```
193190

194191
## Common Questions

0 commit comments

Comments
 (0)