Skip to content

Commit 4fe9abe

Browse files
committed
fixes
1 parent 53a7bdc commit 4fe9abe

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

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

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,9 @@ Update-AzAutoscaleSetting `
254254

255255
Recurring profiles let you schedule a scaling profile that repeats each week. For example, scale to a single instance on the weekend from Friday night to Monday morning.
256256

257-
While scheduled profiles have a start and end date, recurring profiles don't have an end time. The profile remains active until another profile becomes active. You must therefore create recurring default profile to start when you want the previous recurring profile to finish.
258-
For example, to configure a weekend profile that starts on Friday nights and ends on Monday mornings, create one profile that starts on Friday night, and a copy of the default profile that starts on Monday morning.
257+
While scheduled profiles have a start and end date, recurring profiles don't have an end time. A profile remains active until the next profile's start time. Therefore, when you create a recurring profile you must create a recurring default profile that starts when you want the previous recurring profile to finish.
258+
259+
For example, to configure a weekend profile that starts on Friday nights and ends on Monday mornings, create a profile that starts on Friday night, then create recurring profile with your default settings that starts on Monday morning.
259260

260261
The following script creates a weekend profile and an addition default profile to end the weekend profile.
261262
```azurepowershell
@@ -272,22 +273,23 @@ $fridayProfile=New-AzAutoscaleProfileObject `
272273
-Rule $rule1, $rule2
273274
274275
275-
$mondayProfile=New-AzAutoscaleProfileObject `
276-
-Name "default2" `
277-
-CapacityDefault 1 `
276+
$defaultRecurringProfile=New-AzAutoscaleProfileObject `
277+
-Name "default recurring profile" `
278+
-CapacityDefault 2 `
278279
-CapacityMaximum 10 `
279-
-CapacityMinimum 1 `
280+
-CapacityMinimum 2 `
280281
-RecurrenceFrequency week `
281282
-ScheduleDay "Monday" `
282283
-ScheduleHour 00 `
283284
-ScheduleMinute 00 `
284285
-ScheduleTimeZone "Pacific Standard Time" `
285286
-Rule $rule1, $rule2
286287
287-
Update-AzAutoscaleSetting `
288+
New-AzAutoscaleSetting `
289+
-Location eastus `
288290
-Name vmss-autoscalesetting1 `
289291
-ResourceGroupName $resourceGroupName `
290-
-Profile $defaultProfile, $highDemandDay, $fridayProfile, $mondayProfile `
292+
-Profile $defaultRecurringProfile, $fridayProfile `
291293
-Notification $notification1 `
292294
-TargetResourceUri "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.Compute/virtualMachineScaleSets/$vmssName"
293295

0 commit comments

Comments
 (0)