Skip to content

Commit c39fe7f

Browse files
authored
Merge pull request #188354 from sefriend/autoscale-doc-updates
Autoscale doc updates
2 parents e0457cd + f1fdb85 commit c39fe7f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

articles/virtual-desktop/set-up-scaling-script.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ First, you'll need an Azure Automation account to run the PowerShell runbook. Th
115115
>[!NOTE]
116116
>If your policy doesn't let you create scaling script resources in a specific region, update the policy assignment and add the region you want to the list of allowed regions.
117117
118-
5. The cmdlet's output will include a webhook URI. Make sure to keep a record of the URI because you'll use it as a parameter when you set up the execution schedule for the Azure Logic App.
118+
5. If you haven't created an automation account before, the cmdlet's output will include an encrypted webhook URI in the automation account variable. Make sure to keep a record of the URI because you'll use it as a parameter when you set up the execution schedule for the Azure Logic App. If you're updating an existing automation account, you can retrieve the webhook URI using [PowerShell to access variables](../automation/shared-resources/variables.md#powershell-cmdlets-to-access-variables).
119119
120120
6. If you specified the parameter **WorkspaceName** for Log Analytics, the cmdlet's output will also include the Log Analytics Workspace ID and its Primary Key. Make sure to remember URI because you'll need to use it again later as a parameter when you set up the execution schedule for the Azure Logic App.
121121
@@ -197,12 +197,12 @@ Finally, you'll need to create the Azure Logic App and set up an execution sched
197197
$LimitSecondsToForceLogOffUser = Read-Host -Prompt "Enter the number of seconds to wait before automatically signing out users. If set to 0, any session host VM that has user sessions, will be left untouched"
198198
$LogOffMessageTitle = Read-Host -Prompt "Enter the title of the message sent to the user before they are forced to sign out"
199199
$LogOffMessageBody = Read-Host -Prompt "Enter the body of the message sent to the user before they are forced to sign out"
200-
200+
201201
$AutoAccount = Get-AzAutomationAccount | Out-GridView -OutputMode:Single -Title "Select the Azure Automation account"
202202
$AutoAccountConnection = Get-AzAutomationConnection -ResourceGroupName $AutoAccount.ResourceGroupName -AutomationAccountName $AutoAccount.AutomationAccountName | Out-GridView -OutputMode:Single -Title "Select the Azure RunAs connection asset"
203-
204-
$WebhookURIAutoVar = Get-AzAutomationVariable -Name 'WebhookURIARMBased' -ResourceGroupName $AutoAccount.ResourceGroupName -AutomationAccountName $AutoAccount.AutomationAccountName
205-
203+
204+
$WebhookURI = Read-Host -Prompt "Enter the webhook URI that has already been generated for this Azure Automation account. The URI is stored as encrypted in the above Automation Account variable. To retrieve the value, see https://docs.microsoft.com/azure/automation/shared-resources/variables?tabs=azure-powershell#powershell-cmdlets-to-access-variables"
205+
206206
$Params = @{
207207
"AADTenantId" = $AADTenantId # Optional. If not specified, it will use the current Azure context
208208
"SubscriptionID" = $AzSubscription.Id # Optional. If not specified, it will use the current Azure context
@@ -224,7 +224,7 @@ Finally, you'll need to create the Azure Logic App and set up an execution sched
224224
"LimitSecondsToForceLogOffUser" = $LimitSecondsToForceLogOffUser # Optional. Default: 1
225225
"LogOffMessageTitle" = $LogOffMessageTitle # Optional. Default: "Machine is about to shutdown."
226226
"LogOffMessageBody" = $LogOffMessageBody # Optional. Default: "Your session will be logged off. Please save and close everything."
227-
"WebhookURI" = $WebhookURIAutoVar.Value
227+
"WebhookURI" = $WebhookURI
228228
}
229229
230230
.\CreateOrUpdateAzLogicApp.ps1 @Params
@@ -234,7 +234,7 @@ Finally, you'll need to create the Azure Logic App and set up an execution sched
234234
235235
>[!div class="mx-imgBorder"]
236236
>![An image of the overview page for an example Azure Logic App.](media/logic-app.png)
237-
237+
238238
To make changes to the execution schedule, such as changing the recurrence interval or time zone, go to the Azure Logic App autoscale scheduler and select **Edit** to go to the Azure Logic App Designer.
239239
240240
>[!div class="mx-imgBorder"]

0 commit comments

Comments
 (0)