Skip to content

Commit 8ee35f5

Browse files
committed
OrchestrationMode
1 parent 4fe9abe commit 8ee35f5

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

articles/azure-monitor/autoscale/autoscale-using-powershell.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ ms.reviewer: akkumari
1717
Autoscale settings help ensure that you have the right amount of resources running to handle the fluctuating load of your application. You can configure autoscale using the Azure portal, Azure CLI, PowerShell or ARM or Bicep templates.
1818

1919
This article shows you how to configure autoscale for a Virtual Machine Scale Set with PowerShell, using the following steps:
20+
2021
+ Create a scale set that you can autoscale
2122
+ Create rules to scale in and scale out
2223
+ Create a profile that uses your rules
@@ -35,6 +36,7 @@ $subscriptionId = (Get-AzContext).Subscription.Id
3536
$resourceGroupName="rg-powershell-autoscale"
3637
$vmssName="vmss-001"
3738
```
39+
3840
## Create a Virtual Machine Scale Set
3941

4042
Create a scale set using the following cmdlets. Set the `$resourceGroupName` and `$vmssName` variables to suite your environment.
@@ -49,15 +51,16 @@ $vmCred = New-Object System.Management.Automation.PSCredential('azureuser', $vmP
4951
5052
5153
New-AzVmss `
52-
-ResourceGroupName $resourceGroupName `
53-
-Location "EastUS" `
54-
-VMScaleSetName $vmssName `
55-
-Credential $vmCred `
56-
-VirtualNetworkName "myVnet" `
57-
-SubnetName "mySubnet" `
58-
-PublicIpAddressName "myPublicIPAddress" `
59-
-LoadBalancerName "myLoadBalancer" `
60-
-UpgradePolicyMode "Automatic"
54+
-ResourceGroupName $resourceGroupName `
55+
-Location "EastUS" `
56+
-VMScaleSetName $vmssName `
57+
-Credential $vmCred `
58+
-VirtualNetworkName "myVnet" `
59+
-SubnetName "mySubnet" `
60+
-PublicIpAddressName "myPublicIPAddress" `
61+
-LoadBalancerName "myLoadBalancer" `
62+
-OrchestrationMode "Flexible"
63+
6164
```
6265

6366
## Create autoscale settings
@@ -74,7 +77,7 @@ To create autoscale setting using PowerShell, follow the sequence below:
7477
Create scale in and scale out rules then associated them with a profile.
7578
Rules are created using the [`New-AzAutoscaleScaleRuleObject`](https://learn.microsoft.com/powershell/module/az.monitor/new-azautoscalescaleruleobject).
7679

77-
The following PowerShell script created two rules.
80+
The following PowerShell script creates two rules.
7881

7982
+ Scale out when Percentage CPU exceeds 70%
8083
+ Scale in when Percentage CPU is less than 30%
@@ -112,6 +115,7 @@ $rule2=New-AzAutoscaleScaleRuleObject `
112115
-ScaleActionValue 1 `
113116
-ScaleActionCooldown ([System.TimeSpan]::New(0,5,0))
114117
```
118+
The table below describes the pararameters used in the `New-AzAutoscaleScaleRuleObject` cmdlet.
115119

116120
|Parameter| Description|
117121
|---|---|
@@ -142,7 +146,7 @@ $defaultProfile=New-AzAutoscaleProfileObject `
142146
-Rule $rule1, $rule2
143147
```
144148

145-
Parameters
149+
The table below describes the pararameters used in the `New-AzAutoscaleProfileObject` cmdlet.
146150

147151
|Parameter|Description|
148152
|---|---|

0 commit comments

Comments
 (0)