< Back

Invoke-NRQLQuery

Sat Jan 18, 2020 5:05 pm

NAME Invoke-NRQLQuery



SYNOPSIS

Invokes a NRQL query





SYNTAX

Invoke-NRQLQuery [-AccountId <Object>] [-Query <Object>] [-QueryKey <Object>] [<CommonParameters>]





DESCRIPTION

Invokes either and insert or query request against New Relic Insights





PARAMETERS

-AccountId <Object>

Account ID to run the query against



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Query <Object>

The NRQL query to be run



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-QueryKey <Object>

QueryKey to run the NRQL query with



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>$Query = Select * FROM



Invoke-NRQLQuery -AccountId '1111111' `

-Query "SELECT count(errorMessage) FROM Transaction FACET errorMessage limit 5 SINCE 7 DAYS AGO" `

-QueryKey 'xxxxxxxxxxxxx'



Returns the results from the query run against the accountId











RELATED LINKS