You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-monitor/autoscale/autoscale-using-powershell.md
+51-37Lines changed: 51 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,60 +10,42 @@ ms.reviewer: akkumari
10
10
11
11
# Customer intent: As a user or dev ops administrator, I want to use powershell to set up autoscale so I can scale my VMSS.
12
12
13
-
14
-
1-sentence Intro to autoscale
15
-
Benefits of using Poowershell to configurye autoscale
16
-
Prereqs
17
-
- give powershell to create VMSS ? ( how do they create load ?)
18
-
- Windows or linux ? ( linux)
19
-
- provide a vm image ? (git, galery ? which user owns it ?)
20
-
- assume VMSS exists ?
21
-
- create an image - too complicated
22
-
23
-
Define the scenario
24
-
scripts to create the objects.
25
-
For each Object define what is required with example
26
-
27
-
28
13
---
29
14
30
15
# Configure autoscale with PowerShell
31
16
32
-
Autoscale settings help ensure that you have the right amount of resources running to handle the fluctuating load of your application.Cyou can configure autoscale using the Azure portal, Azure CLI, PowerShell or ARM or Bicep templates.
17
+
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.
33
18
34
-
This article shows you haw to configure autoscale for a Virtual Machine Scale Set using Powershell
19
+
This article shows you how to configure autoscale for a Virtual Machine Scale Set using Powershell using the following steps:
20
+
+ Create a scale set that you can autoscale
21
+
+ Create rules to scale in and scale out
22
+
+ Create a profile that uses your rules
23
+
+ Apply the autoscale settings
24
+
+ Update your autoscale settings with notifications
35
25
36
26
## Prerequisites
37
27
38
28
To configure autoscale using PowerShell, you need an Azure account with an active subscription. You can [create an account for free](https://azure.microsoft.com/free).
39
29
40
-
## Overview
41
-
42
-
+ Start by creating a scale set that you can autoscle
### Create an autoscale profile and associate the rules
150
133
151
-
After defining the scale rules, create a profile. The profile specifies the default, upper, and lower instance count limits, and the times that the associated rules can be applied. Use thew[`New-AzAutoscaleProfileObject`](https://learn.microsoft.com/powershell/module/az.monitor/new-azautoscaleprofileobject)command to create a new autoscale profile.
134
+
After defining the scale rules, create a profile. The profile specifies the default, upper, and lower instance count limits, and the times that the associated rules can be applied. Use the[`New-AzAutoscaleProfileObject`](https://learn.microsoft.com/powershell/module/az.monitor/new-azautoscaleprofileobject)cmdlet to create a new autoscale profile.
|`CapacityDefault`| The number of instances that will be set if metrics are not available for evaluation. The default is only used if the current instance count is lower than the default.
170
155
| `CapacityMaximum` |The maximum number of instances for the resource. The maximum number of instances is further limited by the number of cores that are available in the subscription.
Configure the notification using the webhook and set up email notification using the [`New-AzAutoscaleNotificationObject`](https://learn.microsoft.com/powershell/module/az.monitor/new-azautoscalenotificationobject)command:
193
+
Configure the notification using the webhook and set up email notification using the [`New-AzAutoscaleNotificationObject`](https://learn.microsoft.com/powershell/module/az.monitor/new-azautoscalenotificationobject)cmdlet:
209
194
210
195
```azurepowershell
211
196
@@ -229,3 +214,32 @@ Update-AzAutoscaleSetting `
229
214
230
215
```
231
216
217
+
## Review your autoscale settings
218
+
219
+
To review your autoscale settings load the settings into a variable using `Get-AzAutoscaleSetting` then output the variable as follows:
For a complete list of PowerShell cmdlets for autoscale, see the [Poweshell Module Browser](https://learn.microsoft.com/powershell/module/?term=azautoscale)
234
+
235
+
236
+
237
+
## Clean up resources
238
+
239
+
To cleanup the resources you created in this tutorial delete the resource group that you created.
240
+
The following cmdlet deletes the resource group and all of its resources.
0 commit comments