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/virtual-desktop/set-up-scaling-script.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,7 +115,7 @@ First, you'll need an Azure Automation account to run the PowerShell runbook. Th
115
115
>[!NOTE]
116
116
>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.
117
117
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).
119
119
120
120
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.
121
121
@@ -197,12 +197,12 @@ Finally, you'll need to create the Azure Logic App and set up an execution sched
197
197
$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"
198
198
$LogOffMessageTitle = Read-Host -Prompt "Enter the title of the message sent to the user before they are forced to sign out"
199
199
$LogOffMessageBody = Read-Host -Prompt "Enter the body of the message sent to the user before they are forced to sign out"
$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
+
206
206
$Params = @{
207
207
"AADTenantId" = $AADTenantId # Optional. If not specified, it will use the current Azure context
208
208
"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
"LogOffMessageTitle" = $LogOffMessageTitle # Optional. Default: "Machine is about to shutdown."
226
226
"LogOffMessageBody" = $LogOffMessageBody # Optional. Default: "Your session will be logged off. Please save and close everything."
227
-
"WebhookURI" = $WebhookURIAutoVar.Value
227
+
"WebhookURI" = $WebhookURI
228
228
}
229
229
230
230
.\CreateOrUpdateAzLogicApp.ps1 @Params
@@ -234,7 +234,7 @@ Finally, you'll need to create the Azure Logic App and set up an execution sched
234
234
235
235
>[!div class="mx-imgBorder"]
236
236
>
237
-
237
+
238
238
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.
0 commit comments