Skip to content

Commit 478b0bf

Browse files
author
Cynthia Nottingham
committed
formatting
1 parent 7b485e5 commit 478b0bf

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

articles/virtual-machines/windows/proximity-placement-groups.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Get-AzProximityPlacementGroup -ResourceId $ppg.Id |
6666
Format-Table -Property VirtualMachines -Wrap
6767
```
6868

69-
## Move an existing VM into a proximity placement group
69+
### Move an existing VM into a proximity placement group
7070

7171
You can also add an existing VM to a proximity placement group. You need to stop\deallocate the VM first, then update the VM and restart.
7272

@@ -78,7 +78,7 @@ Update-AzVM -VM $vm -ResourceGroupName $vm.ResourceGroupName -ProximityPlacement
7878
Restart-AzVM -Name $vm.Name -ResourceGroupName $vm.ResourceGroupName
7979
```
8080

81-
## Move an existing VM out of a proximity placement group
81+
### Move an existing VM out of a proximity placement group
8282

8383
To remove a VM from a proximity placement group, you need to stop\deallocate the VM first, then update the VM and restart.
8484

@@ -120,6 +120,7 @@ foreach ($vmId in $vmIDs){
120120
```
121121

122122
### Move an existing availability set out of a proximity placement group
123+
123124
```azurepowershell-interactive
124125
$resourceGroup = "myResourceGroup"
125126
$avSetName = "myAvailabilitySet"
@@ -149,19 +150,23 @@ To add or remove an existing scale set to a proximity placement group, you first
149150

150151
### Move an existing scale set into a proximity placement group
151152

153+
```azurepowershell-interactive
152154
$ppg = Get-AzProximityPlacementGroup -ResourceGroupName myPPG -Name myPPG
153155
$vmss = Get-AzVmss -ResourceGroupName myVMSSResourceGroup -VMScaleSetName myScaleSet
154156
Stop-AzVmss -VMScaleSetName $vmss.Name -ResourceGroupName $vmss.ResourceGroupName
155157
Update-AzVmss -VMScaleSetName $vmss.Name -ResourceGroupName $vmss.ResourceGroupName -ProximityPlacementGroupId $ppg.Id
156158
Restart-AzVmss -VMScaleSetName $vmss.Name -ResourceGroupName $vmss.ResourceGroupName
159+
```
157160

158161
### Move an existing scale set out of a proximity placement group
159162

163+
```azurepowershell-interactive
160164
$vmss = Get-AzVmss -ResourceGroupName myVMSSResourceGroup -VMScaleSetName myScaleSet
161165
Stop-AzVmss -VMScaleSetName $vmss.Name -ResourceGroupName $vmss.ResourceGroupName
162166
$vmss.ProximityPlacementGroup = ""
163167
Update-AzVmss -VirtualMachineScaleSet $vmss -VMScaleSetName $vmss.Name -ResourceGroupName $vmss.ResourceGroupName
164168
Restart-AzVmss -VMScaleSetName $vmss.Name -ResourceGroupName $vmss.ResourceGroupName
169+
```
165170

166171
## Next steps
167172

0 commit comments

Comments
 (0)