Skip to content

Commit 824cf5b

Browse files
committed
fixed warnings
1 parent ae52b26 commit 824cf5b

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

articles/update-manager/tutorial-webhooks-using-runbooks.md

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -89,34 +89,29 @@ In this tutorial, you learn how to:
8989
if ($resourceSubscriptionIds.Count -gt 0) {
9090
9191
Write-Output "Querying ARG to get machine details[MaintenanceRunId=$maintenanceRunId][ResourceSubscriptionIdsCount=$($resourceSubscriptionIds.Count)]"
92-
9392
$argQuery = @"maintenanceresources
94-
9593
| where type =~ 'microsoft.maintenance/applyupdates'
96-
| where properties.correlationId =~ '$($maintenanceRunId)'
94+
| where properties.correlationId =~ '$($maintenanceRunId)'
9795
| where id has '/providers/microsoft.compute/virtualmachines/'
9896
| project id, resourceId = tostring(properties.resourceId)
9997
| order by id asc
100-
"@
101-
98+
"@
99+
102100
Write-Output "Arg Query Used: $argQuery"
103101
$allMachines = [System.Collections.ArrayList]@()
104-
$skipToken = $null
105-
do
106-
102+
$skipToken = $null
107103
$res = Search-AzGraph -Query $argQuery -First 1000 -SkipToken $skipToken -Subscription $resourceSubscriptionIds
108104
$skipToken = $res.SkipToken
109105
$allMachines.AddRange($res.Data)
110-
} while ($skipToken -ne $null -and $skipToken.Length -ne 0)
106+
} while ($skipToken -ne $null -and $skipToken.Length -ne 0)
107+
111108
if ($allMachines.Count -eq 0) {
112109
Write-Output "No Machines were found."
113110
break
114111
}
115-
}
116-
117-
```
118-
119-
4. To customize you can use either your existing scripts with the above modifications done or use the following scripts.
112+
```
113+
114+
1. To customize you can use either your existing scripts with the above modifications done or use the following scripts.
120115
121116
122117
### Sample scripts
@@ -352,11 +347,11 @@ Invoke-AzRestMethod `
352347
1. On the **Maintenance Configuration** page, select the configuration.
353348
1. Under **Settings**, select **Events**.
354349
355-
:::image type="content" source="./media/tutorial-webhooks-using-runbooks/pre-post-select-events.png" alt-text="Screenshot that shows the options to select the events menu option." lightbox="tutorial-webhooks-using-runbooks/pre-post-select-events.png":::
350+
:::image type="content" source="./media/tutorial-webhooks-using-runbooks/pre-post-select-events.png" alt-text="Screenshot that shows the options to select the events menu option." lightbox="./media/tutorial-webhooks-using-runbooks/pre-post-select-events.png":::
356351
357352
1. Select **+Event Subscription** to create a pre/post maintenance event.
358353
359-
:::image type="content" source="./media/tutorial-webhooks-using-runbooks/select-event-subscriptions.png" alt-text="Screenshot that shows the options to select the events subscriptions." lightbox="tutorial-webhooks-using-runbooks/select-event-subscriptions.png":::
354+
:::image type="content" source="./media/tutorial-webhooks-using-runbooks/select-event-subscriptions.png" alt-text="Screenshot that shows the options to select the events subscriptions." lightbox="./media/tutorial-webhooks-using-runbooks/select-event-subscriptions.png":::
360355
361356
1. On the **Create Event Subscription** page, enter the following details:
362357
1. In the **Event Subscription Details** section, provide an appropriate name.
@@ -368,7 +363,7 @@ Invoke-AzRestMethod `
368363
1. Select **Post Maintenance Event** for a post-event.
369364
- In the **Endpoint details** section, the **Webhook** endpoint and select **Configure and Endpoint**.
370365
- Provide the appropriate details such as post-event webhook **URL** to trigger the event.
371-
:::image type="content" source="./media/tutorial-webhooks-using-runbooks/create-event-subscription.png" alt-text="Screenshot that shows the options to create the events subscriptions." lightbox="tutorial-webhooks-using-runbooks/create-event-subscription.png":::
366+
:::image type="content" source="./media/tutorial-webhooks-using-runbooks/create-event-subscription.png" alt-text="Screenshot that shows the options to create the events subscriptions." lightbox="./media/tutorial-webhooks-using-runbooks/create-event-subscription.png":::
372367
373368
1. Select **Create**.
374369

0 commit comments

Comments
 (0)