Skip to content

Get-LMDeviceInstanceData

Terminal window
Get-LMDeviceInstanceData [[-StartDate] <datetime>] [[-EndDate] <datetime>] [-Ids] <string[]>
[[-AggregationType] <string>] [[-Period] <double>] [<CommonParameters>]

The Get-LMDeviceInstanceData function retrieves monitoring data for specified device instances in LogicMonitor. It supports data aggregation and time range filtering, with a maximum timeframe of 24 hours.

Terminal window
#Retrieve data for multiple instances with aggregation
Get-LMDeviceInstanceData -Ids "12345","67890" -AggregationType "average" -StartDate (Get-Date).AddHours(-12)
Terminal window
#Retrieve raw data for a single instance
Get-LMDeviceInstanceData -Id "12345" -AggregationType "none"

The type of aggregation to apply to the data. Valid values are “first”, “last”, “min”, “max”, “sum”, “average”, “none”. Defaults to “none”.

Type: System.String
DefaultValue: none
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 3
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

The end date for the data retrieval. Defaults to current time if not specified.

Type: System.DateTime
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 1
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

An array of device instance IDs for which to retrieve data. This parameter is mandatory and can be specified using the Id alias.

Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases:
- Id
ParameterSets:
- Name: (All)
Position: 2
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

The period for data aggregation. Defaults to 1 as this appears to be the only supported value.

Type: System.Double
DefaultValue: 1
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 4
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

The start date for the data retrieval. Defaults to 24 hours ago if not specified.

Type: System.DateTime
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

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.