Skip to content

Set-LMDeviceGroupDatasource

Terminal window
Set-LMDeviceGroupDatasource -DatasourceName <string> -Name <string> [-StopMonitoring <bool>]
[-WhatIf] [-Confirm] [<CommonParameters>]
Terminal window
Set-LMDeviceGroupDatasource -DatasourceName <string> -Id <int> [-StopMonitoring <bool>] [-WhatIf]
[-Confirm] [<CommonParameters>]
Terminal window
Set-LMDeviceGroupDatasource -DatasourceId <int> -Name <string> [-StopMonitoring <bool>] [-WhatIf]
[-Confirm] [<CommonParameters>]
Terminal window
Set-LMDeviceGroupDatasource -DatasourceId <int> -Id <int> [-StopMonitoring <bool>] [-WhatIf]
[-Confirm] [<CommonParameters>]

The Set-LMDeviceGroupDatasource cmdlet modifies an existing device group datasource in LogicMonitor, allowing updates to monitoring state. This cmdlet provides control over the “Enable” checkbox (stopMonitoring) for a datasource applied to a device group. For alert settings use Set-LMDeviceGroupDatasourceAlertSetting.

Terminal window
#Disable monitoring for a datasource on a device group
Set-LMDeviceGroupDatasource -Id 15 -DatasourceId 790 -StopMonitoring $true
Terminal window
#Enable monitoring using names
Set-LMDeviceGroupDatasource -Name "Production Servers" -DatasourceName "CPU" -StopMonitoring $false

Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- cf
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

Specifies the ID of the datasource. Required when using the ‘Id-dsId’ or ‘Name-dsId’ parameter sets.

Type: System.Int32
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Name-dsId
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
- Name: Id-dsId
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

Specifies the name of the datasource. Required when using the ‘Id-dsName’ or ‘Name-dsName’ parameter sets.

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

Specifies the ID of the device group. Required when using the ‘Id-dsId’ or ‘Id-dsName’ parameter sets.

Type: System.Int32
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Id-dsName
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
- Name: Id-dsId
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

Specifies the name of the device group. Required when using the ‘Name-dsId’ or ‘Name-dsName’ parameter sets.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Name-dsId
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
- Name: Name-dsName
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

Specifies whether to stop monitoring the datasource. When set to $true, monitoring is disabled (unchecks the “Enable” checkbox). When set to $false, monitoring is enabled (checks the “Enable” checkbox).

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

Runs the command in a mode that only reports what would happen without performing the actions.

Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- wi
ParameterSets:
- Name: (All)
Position: Named
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.