Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/ResourceGraph/ResourceGraph/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
-->
## Upcoming Release
* Ignoring subscription from azure context
* Add two examples for cmdlet `Search-AzGraph` with parameter `-Include`.

## Version 0.7.5
* Showing warnings in cases when too many subscriptions were used or results got truncated.
Expand Down
21 changes: 21 additions & 0 deletions src/ResourceGraph/ResourceGraph/help/Search-AzGraph.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,27 @@ westus 26

A complex query on resources featuring field selection, filtering and summarizing.

### Example 3
```powershell
PS C:\> Search-AzGraph -Include DisplayName -Query 'where type =~ "Microsoft.Compute/virtualMachines"| where properties.storageProfile.osDisk.managedDisk == "" | project name, resourceGroup, subscriptionDisplayName'

name resourceGroup subscriptionDisplayName
---- ------------- -----------------------
ContosoVM RG-Contoso Contoso Production Subscription

```
A query featuring all virtual machines which are not using Managed Disks and includes subscription display names.

### Example 4
```powershell
PS C:\> Search-AzGraph -Include DisplayName -Query 'summarize count() by tenantDisplayName, subscriptionDisplayName'

tenantDisplayName subscriptionDisplayName count_
----------------- ----------------------- ------
ContosoTenant Contoso Production Subscription 118
```
A query displaying the count of resources by tenant and subscription display names.

## PARAMETERS

### -DefaultProfile
Expand Down