< Back

Get-NRApplication

Sat Jan 18, 2020 5:05 pm

NAME Get-NRApplication



SYNOPSIS

Builds up and submits a web request to the New Relic API.





SYNTAX

Get-NRApplication -ApiKey <String> [<CommonParameters>]



Get-NRApplication -ApiKey <String> [-ID <Int32>] [<CommonParameters>]



Get-NRApplication -ApiKey <String> [-Name <String>] [<CommonParameters>]





DESCRIPTION

Will build a properly structured web request to use for the New Relic API. This is mostly used by other

cmdlets and is meant to be generic, thus it will not form the body or URI needed for most requests.





PARAMETERS

-ApiKey <String>

Api key for connecting to New Relic. Go to the link below for more details:

https://docs.newrelic.com/docs/apis/res ... s/api-keys



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Name <String>

Name of the application, can accept wildcards '*'



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-ID <Int32>

ID of the application



Required? false

Position? named

Default value 0

Accept pipeline input? true (ByValue)

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

System.Management.Automation.PSCustomObject

The object returned is the application block (converted from json) from the web request response.





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



PS C:\\>Get-NRApplication -ApiKey '1234abc'



# Returns all applications for the account









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-NRApplication -ApiKey '1234abc' -Id '111931'



# Returns just the application object for the specified ID









-------------------------- EXAMPLE 3 --------------------------



PS C:\\>Get-NRApplication -ApiKey '1234abc' -Name 'MyWebApp'



# Returns just the application object for the specified name











RELATED LINKS