Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.dll-Help.xml

<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh">
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Search-AzGraph</command:name>
      <command:verb>Search</command:verb>
      <command:noun>AzGraph</command:noun>
      <maml:description>
        <maml:para>Queries the resources managed by Azure Resource Manager.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Learn more about the query syntax here: https://aka.ms/resource-graph/learntoquery</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Search-AzGraph</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none">
          <maml:name>Query</maml:name>
          <maml:Description>
            <maml:para>Resource Graph query.</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="AzContext, AzureRmContext, AzureCredential">
          <maml:name>DefaultProfile</maml:name>
          <maml:Description>
            <maml:para>The credentials, account, tenant, and subscription used for communication with Azure.</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer</command:parameterValue>
          <dev:type>
            <maml:name>Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Subscription</maml:name>
          <maml:Description>
            <maml:para>Subscription(s) to run query against.</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">System.String[]</command:parameterValue>
          <dev:type>
            <maml:name>System.String[]</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Skip</maml:name>
          <maml:Description>
            <maml:para>Ignores the first N objects and then gets the remaining objects.</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">System.Int32</command:parameterValue>
          <dev:type>
            <maml:name>System.Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>First</maml:name>
          <maml:Description>
            <maml:para>The maximum number of objects to return. Allowed values: 1-5000. Default value is 100.</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">System.Int32</command:parameterValue>
          <dev:type>
            <maml:name>System.Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="AzContext, AzureRmContext, AzureCredential">
        <maml:name>DefaultProfile</maml:name>
        <maml:Description>
          <maml:para>The credentials, account, tenant, and subscription used for communication with Azure.</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer</command:parameterValue>
        <dev:type>
          <maml:name>Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none">
        <maml:name>Query</maml:name>
        <maml:Description>
          <maml:para>Resource Graph query.</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>Subscription</maml:name>
        <maml:Description>
          <maml:para>Subscription(s) to run query against.</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">System.String[]</command:parameterValue>
        <dev:type>
          <maml:name>System.String[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>Skip</maml:name>
        <maml:Description>
          <maml:para>Ignores the first N objects and then gets the remaining objects.</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">System.Int32</command:parameterValue>
        <dev:type>
          <maml:name>System.Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>First</maml:name>
        <maml:Description>
          <maml:para>The maximum number of objects to return. Allowed values: 1-5000. Default value is 100.</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">System.Int32</command:parameterValue>
        <dev:type>
          <maml:name>System.Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>None</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>System.Management.Automation.PSObject</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------------------- Example 1 --------------------------</maml:title>
        <dev:code>PS C:\&gt; Search-AzGraph "project id, name, type, location, tags" -First 3
 
 
id : /subscriptions/1ef51df4-f8a9-4b69-9919-1ef51df4eff6/resourceGroups/Service-INT-a/providers/Microsoft.Compute/virtualMachineScaleSets/nt
name : nt
type : microsoft.compute/virtualmachinescalesets
location : eastus
tags : @{resourceType=Service Fabric; clusterName=gov-art-int-nt-a}
 
id : /subscriptions/1ef51df4-f8a9-4b69-9919-1ef51df4eff6/resourceGroups/Service-INT-a/providers/Microsoft.EventGrid/topics/egtopic-1
name : egtopic-1
type : microsoft.eventgrid/topics
location : westus2
tags :</dev:code>
        <dev:remarks>
          <maml:para>Simple resources query requesting a subset of resource fields.</maml:para>
<maml:para></maml:para>
<maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- Example 2 --------------------------</maml:title>
        <dev:code>PS C:\&gt; Search-AzGraph "project id, name, type, location | where type =~ 'Microsoft.Compute/virtualMachines' | summarize count() by location | top 3 by count_"
 
location count_
-------- ------
eastus 66
westcentralus 32
westus 26</dev:code>
        <dev:remarks>
          <maml:para>A complex query on resources featuring field selection, filtering and summarizing.</maml:para>
<maml:para></maml:para>
<maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- Example 3 --------------------------</maml:title>
        <dev:code>PS C:\&gt; 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</dev:code>
        <dev:remarks>
          <maml:para>A query featuring all virtual machines which are not using Managed Disks and includes subscription display names.</maml:para>
<maml:para></maml:para>
<maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- Example 4 --------------------------</maml:title>
        <dev:code>PS C:\&gt; Search-AzGraph -Include DisplayName -Query 'summarize count() by tenantDisplayName, subscriptionDisplayName'
 
tenantDisplayName subscriptionDisplayName count_
----------------- ----------------------- ------
ContosoTenant Contoso Production Subscription 118</dev:code>
        <dev:remarks>
          <maml:para>A query displaying the count of resources by tenant and subscription display names.</maml:para>
<maml:para></maml:para>
<maml:para></maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Version:</maml:linkText>
        <maml:uri>https://docs.microsoft.com/en-us/powershell/module/az.resourcegraph/search-azgraph</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
</helpItems>