Skip to content

Commit 53a7bdc

Browse files
committed
review2
1 parent a81dca6 commit 53a7bdc

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

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

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,19 @@ This article shows you how to configure autoscale for a Virtual Machine Scale Se
2727

2828
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).
2929

30-
31-
## Create a Virtual Machine Scale Set
32-
33-
Create a scale set using the following cmdlets. Set the `$resourceGroupName` and `$vmssName` variables to suite your environment.
30+
## Set up your environemnt
3431

3532
```azurepowershell
36-
#Set the VMSS name and resource group name
37-
33+
#Set the subscription Id, VMSS name, and resource group name
3834
$subscriptionId = (Get-AzContext).Subscription.Id
3935
$resourceGroupName="rg-powershell-autoscale"
4036
$vmssName="vmss-001"
37+
```
38+
## Create a Virtual Machine Scale Set
4139

40+
Create a scale set using the following cmdlets. Set the `$resourceGroupName` and `$vmssName` variables to suite your environment.
41+
42+
```azurepowershell
4243
# create a new resource group
4344
New-AzResourceGroup -ResourceGroupName $resourceGroupName -Location "EastUS"
4445
@@ -65,7 +66,8 @@ To create autoscale setting using PowerShell, follow the sequence below:
6566

6667
1. Create rules using `New-AzAutoscaleScaleRuleObject`
6768
1. Create a profile using `New-AzAutoscaleProfileObject`
68-
1. Create or update the autoscale settings using `Update-AzAutoscaleSetting`
69+
1. Create the autoscale settings using `New-AzAutoscaleSetting`
70+
1. Update the settings using `Update-AzAutoscaleSetting`
6971

7072
### Create rules
7173

@@ -79,9 +81,6 @@ The following PowerShell script created two rules.
7981

8082
```azurepowershell
8183
82-
$resourceGroupName="rg-powershell-autoscale"
83-
$vmssName="vmss-001"
84-
8584
$rule1=New-AzAutoscaleScaleRuleObject `
8685
-MetricTriggerMetricName "Percentage CPU" `
8786
-MetricTriggerMetricResourceUri "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.Compute/virtualMachineScaleSets/$vmssName" `
@@ -182,7 +181,7 @@ For more information on webhook notifications, see [`New-AzAutoscaleWebhookNotif
182181
Set a webhook using the following cmdlet;
183182
```azurepowershell
184183
185-
$webhook1=New-AzAutoscaleWebhookNotificationObject -Property @{} -ServiceUri "http://contoso.com/wbhook1"
184+
$webhook1=New-AzAutoscaleWebhookNotificationObject -Property @{} -ServiceUri "http://contoso.com/webhook1"
186185
```
187186

188187
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:
@@ -294,6 +293,8 @@ Update-AzAutoscaleSetting `
294293
295294
```
296295

296+
For more information on scheduled profiles, see [Autoscale with multiple profiles](./autoscale-multiprofile.md)
297+
297298
## Other autoscale commands
298299

299300
For a complete list of PowerShell cmdlets for autoscale, see the [PowerShell Module Browser](https://learn.microsoft.com/powershell/module/?term=azautoscale)

0 commit comments

Comments
 (0)