Skip to content

Commit 2ecdc2e

Browse files
authored
Merge pull request #118878 from alexandair/patch-1
Fix a code example
2 parents 20a855b + 5f84a27 commit 2ecdc2e

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

articles/governance/resource-graph/paginate-powershell.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,11 @@ We'll then configure the query to return five records (VMs) at a time.
7474
```powershell
7575
# Login first with Connect-AzAccount if not using Cloud Shell
7676
77-
# Run Azure Resource Graph query Search-AzGraph -Query "Resources | join kind=leftouter
78-
(ResourceContainers | where type=='microsoft.resources/subscriptions' | project subscriptionName
79-
= name, subscriptionId) on subscriptionId | where type =~ 'Microsoft.Compute/virtualMachines' |
80-
project VMResourceId = id, subscriptionName, resourceGroup, name"
77+
# Run Azure Resource Graph query
78+
Search-AzGraph -Query "Resources | join kind=leftouter (ResourceContainers | where
79+
type=='microsoft.resources/subscriptions' | project subscriptionName = name, subscriptionId) on
80+
subscriptionId | where type =~ 'Microsoft.Compute/virtualMachines' | project VMResourceId = id,
81+
subscriptionName, resourceGroup, name"
8182
```
8283

8384
1. Update the query to implement the `skipToken` parameter and return 5 VMs in each batch:

0 commit comments

Comments
 (0)