Skip to content

Commit eeaab95

Browse files
committed
fix examples
1 parent 9de440f commit eeaab95

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

articles/virtual-network/ip-services/public-ip-upgrade-availability-set.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,23 @@ The module logs all upgrade activity to a file named `AvSetPublicIPUpgrade.log`,
3636
Download the migration script from the [PowerShell Gallery](https://www.powershellgallery.com/packages/AzureAvSetBasicPublicIPUpgrade).
3737

3838
```powershell
39-
PS C:\> Install-Module -Name AzureAvSetBasicPublicIPUpgrade -Scope CurrentUser -Repository PSGallery -Force
39+
Install-Module -Name AzureAvSetBasicPublicIPUpgrade -Scope CurrentUser -Repository PSGallery -Force
4040
```
4141

4242
## Use the module
4343

44-
1. Use `Connect-AzAccount` to connect to the required Microsoft Entra tenant and Azure subscription
44+
1. Use `Select-AzSubscription` to select the Azure subscription where your Availability Set exists
4545

4646
```powershell
47-
PS C:\> Connect-AzAccount -Tenant <TenantId> -Subscription <SubscriptionId>
47+
Select-AzSubscription -Subscription <SubscriptionId>
4848
```
4949
2. Locate the Availability Set with the attached Basic Public IPs that you wish to upgrade. Record its name and resource group name.
5050
5151
3. Examine the module parameters:
5252
- *AvailabilitySetName [string] Required* - This parameter is the name of your Availability Set.
5353
- *ResourceGroupName [string] Required* - This parameter is the resource group for your Availability Set with the Basic Public IPs attached that you want to upgrade.
5454
55-
4. Run the Upgrade command.
55+
4. Run the upgrade, using the following examples or `Get-Help Start-AzAvSetPublicIPUpgrade` for guidance.
5656
5757
### Example uses of the script
5858
@@ -68,23 +68,22 @@ Start-AzAvSetPublicIPUpgrade -availabilitySetName 'myAvSet' -resourceGroupName '
6868

6969
Attempt upgrade of VMs in a every Availability Set the user has access to. VMs without Public IPs, which are already upgraded, or which do not have NSGs are skipped.
7070
```powershell
71-
Get-AzAvailabilitySet -resourceGroupName 'myRG' | Start-AzAvSetPublicIPUpgrade -skipVMMissingNSG
71+
Get-AzAvailabilitySet -resourceGroupName 'myRG' | Start-AzAvSetPublicIPUpgrade -skipVMMissingNSG
7272
```
7373

7474
Recover from a failed migration, passing the name and resource group of the Availability Set to recover, along with the recovery log file.
7575
```powershell
76-
Start-AzAvSetPublicIPUpgrade -RecoverFromFile ./AvSetPublicIPUpgrade_Recovery_2020-01-01-00-00.csv -AvailabilitySetName myAvSet -ResourceGroup rg-myrg
76+
Start-AzAvSetPublicIPUpgrade -RecoverFromFile ./AvSetPublicIPUpgrade_Recovery_2020-01-01-00-00.csv -AvailabilitySetName myAvSet -ResourceGroup rg-myrg
7777
```
7878

79-
8079
### Recovering from a failed migration
8180

8281
If a migration fails due to a transient issue, such as a network outage or client system issue, the migration can be retried to configure the VM and Public IPs in the goal state. At execution, the script outputs a recovery log file, which is used to ensure the VM is properly reconfigured. Review the log file `AvSetPublicIPUpgrade.log` created in the location where the script was executed.
8382

8483
To recover from a failed upgrade, pass the recovery log file path to the script with the `-recoverFromFile` parameter and identify the Availability Set to recover with the `-AvailabilitySetName` parameter, as shown in this example.
8584

8685
```powershell
87-
Start-VMPublicIPUpgrade -RecoverFromFile ./AvSetPublicIPUpgrade_Recovery_2020-01-01-00-00.csv -AvailabilitySetName myAvSet -VMResourceGroup rg-myrg
86+
Start-VMPublicIPUpgrade -RecoverFromFile ./AvSetPublicIPUpgrade_Recovery_2020-01-01-00-00.csv -AvailabilitySetName myAvSet -ResourceGroupName rg-myrg
8887
```
8988

9089
## Common questions

0 commit comments

Comments
 (0)