Skip to content

Commit 86f4800

Browse files
committed
Update tutorial-install-apps-powershell.md
1 parent 2ee659d commit 86f4800

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

articles/virtual-machine-scale-sets/tutorial-install-apps-powershell.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ New-AzVmss `
4646
-VMScaleSetName "myScaleSet" `
4747
-OrchestrationMode "Flexible" `
4848
-Location "EastUS" `
49+
-UpgradePolicyMode "Automatic" `
4950
-VirtualNetworkName "myVnet" `
5051
-SubnetName "mySubnet" `
5152
-PublicIpAddressName "myPublicIPAddress" `
@@ -81,11 +82,15 @@ $vmss = Add-AzVmssExtension `
8182
-TypeHandlerVersion 1.9 `
8283
-Setting $customConfig
8384
84-
# Update the scale set and apply the Custom Script Extension to the VM instances
85+
# Update the scale set
8586
Update-AzVmss `
8687
-ResourceGroupName "myResourceGroup" `
8788
-Name "myScaleSet" `
8889
-VirtualMachineScaleSet $vmss
90+
91+
# Update all of the existing scale set instances
92+
Update-AzVmssInstance -ResourceGroupName "myResourceGroup" -VMScaleSetName "myScaleSet" -InstanceId "*"
93+
8994
```
9095

9196
Each VM instance in the scale set downloads and runs the script from GitHub. In a more complex example, multiple application components and files could be installed. If the scale set is scaled up, the new VM instances automatically apply the same Custom Script Extension definition and install the required application.
@@ -166,9 +171,11 @@ Update-AzVmss `
166171
-ResourceGroupName "myResourceGroup" `
167172
-Name "myScaleSet" `
168173
-VirtualMachineScaleSet $vmss
174+
175+
Update-AzVmssInstance -ResourceGroupName "myResourceGroup" -VMScaleSetName "myScaleSet" -InstanceId "*"
169176
```
170177

171-
All VM instances in the scale set are automatically updated with the latest version of the sample web page. To see the updated version, refresh the web site in your browser:
178+
All VM instances in the scale set are updated with the latest version of the sample web page. To see the updated version, refresh the web site in your browser:
172179

173180
![Updated web page in IIS](media/tutorial-install-apps-powershell/running-iis-updated.png)
174181

0 commit comments

Comments
 (0)