Edit

Share via


Get-AzSentinelEntityQueryTemplate

Gets an entity query.

Syntax

List (Default)

Get-AzSentinelEntityQueryTemplate
    -ResourceGroupName <String>
    -WorkspaceName <String>
    [-SubscriptionId <String[]>]
    [-Kind <String>]
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

Get

Get-AzSentinelEntityQueryTemplate
    -Id <String>
    -ResourceGroupName <String>
    -WorkspaceName <String>
    [-SubscriptionId <String[]>]
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

GetViaIdentity

Get-AzSentinelEntityQueryTemplate
    -InputObject <ISecurityInsightsIdentity>
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

Description

Gets an entity query.

Examples

Example 1: List all Entity Query Templates

Get-AzSentinelEntityQueryTemplate -ResourceGroupName "myResourceGroupName" -workspaceName "myWorkspaceName"
Title           : The user has created an account
Description     : This activity displays account creation events performed by the user
InputEntityType : Account
Kind            : Activity
Name            : d6d08c94-455f-4ea5-8f76-fc6c0c442cfa

Title           : The user has deleted an account
Description     : This activity displays account deletion events performed by the user
InputEntityType : Account
Kind            : Activity
Name            : e0459780-ac9d-4b72-8bd4-fecf6b46a0a1

This command lists all Entity Query Templates under a Microsoft Sentinel workspace.

Example 2: Get an Entity Query Template

Get-AzSentinelEntityQueryTemplate -ResourceGroupName "myResourceGroupName" -workspaceName "myWorkspaceName" -Id "d6d08c94-455f-4ea5-8f76-fc6c0c442cfa"
Description     : This activity displays account creation events performed by the user
InputEntityType : Account
Kind            : Activity
Name            : d6d08c94-455f-4ea5-8f76-fc6c0c442cfa

This command gets an Entity Query Template.

Example 3: Get an Entity Query Template by object Id

$EntityQueryTemplates = Get-AzSentinelEntityQueryTemplate -ResourceGroupName "myResourceGroupName" -workspaceName "myWorkspaceName"
 $EntityQueryTemplates[0] | Get-AzSentinelEntityQueryTemplate
Description     : This activity displays account creation events performed by the user
InputEntityType : Account
Kind            : Activity
Name            : d6d08c94-455f-4ea5-8f76-fc6c0c442cfa

This command gets a Entity Query Template by object.

Parameters

-DefaultProfile

The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

Parameter properties

Type:PSObject
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzureRMContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Id

entity query template ID

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:EntityQueryTemplateId

Parameter sets

Get
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

Parameter properties

Type:ISecurityInsightsIdentity
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GetViaIdentity
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Kind

The entity template query kind we want to fetch

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

List
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceGroupName

The name of the resource group. The name is case insensitive.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

List
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Get
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SubscriptionId

The ID of the target subscription.

Parameter properties

Type:

String[]

Default value:(Get-AzContext).Subscription.Id
Supports wildcards:False
DontShow:False

Parameter sets

List
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Get
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WorkspaceName

The name of the workspace.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

List
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Get
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

ISecurityInsightsIdentity

Outputs

IEntityQueryTemplate