Skip to content

New-LMDeviceDatasourceInstance

Syntax

Name-dsName

Terminal window
New-LMDeviceDatasourceInstance -DisplayName <String> -WildValue <String> [-WildValue2 <String>]
[-Description <String>] [-Properties <Hashtable>] [-StopMonitoring <Boolean>] [-DisableAlerting <Boolean>]
[-InstanceGroupId <String>] -DatasourceName <String> -Name <String> [-ProgressAction <ActionPreference>]
[<CommonParameters>]

Id-dsName

Terminal window
New-LMDeviceDatasourceInstance -DisplayName <String> -WildValue <String> [-WildValue2 <String>]
[-Description <String>] [-Properties <Hashtable>] [-StopMonitoring <Boolean>] [-DisableAlerting <Boolean>]
[-InstanceGroupId <String>] -DatasourceName <String> -Id <Int32> [-ProgressAction <ActionPreference>]
[<CommonParameters>]

Name-dsId

Terminal window
New-LMDeviceDatasourceInstance -DisplayName <String> -WildValue <String> [-WildValue2 <String>]
[-Description <String>] [-Properties <Hashtable>] [-StopMonitoring <Boolean>] [-DisableAlerting <Boolean>]
[-InstanceGroupId <String>] -DatasourceId <Int32> -Name <String> [-ProgressAction <ActionPreference>]
[<CommonParameters>]

Id-dsId

Terminal window
New-LMDeviceDatasourceInstance -DisplayName <String> -WildValue <String> [-WildValue2 <String>]
[-Description <String>] [-Properties <Hashtable>] [-StopMonitoring <Boolean>] [-DisableAlerting <Boolean>]
[-InstanceGroupId <String>] -DatasourceId <Int32> -Id <Int32> [-ProgressAction <ActionPreference>]
[<CommonParameters>]

Description

The New-LMDeviceDatasourceInstance function creates a new instance of a LogicMonitor device datasource. It requires valid API credentials and a logged-in session.

Examples

Example 1

Terminal window
New-LMDeviceDatasourceInstance -DisplayName "Instance 1" -WildValue "Value 1" -Description "This is a new instance" -DatasourceName "DataSource 1" -Name "Host Device 1"

This example creates a new instance of a LogicMonitor device datasource with the specified display name, wild value, description, datasource name, and host device name.

Parameters

-DisplayName

The display name of the new instance.

Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WildValue

The wild value of the new instance.

Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WildValue2

The second wild value of the new instance.

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description

The description of the new instance.

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Properties

A hashtable of custom properties for the new instance.

Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StopMonitoring

Specifies whether to stop monitoring the new instance. Default is $false.

Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DisableAlerting

Specifies whether to disable alerting for the new instance. Default is $false.

Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-InstanceGroupId

The ID of the instance group to which the new instance belongs.

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatasourceName

The name of the datasource associated with the new instance. Mandatory when using the ‘Id-dsName’ or ‘Name-dsName’ parameter sets.

Type: String
Parameter Sets: Name-dsName, Id-dsName
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatasourceId

The ID of the datasource associated with the new instance. Mandatory when using the ‘Id-dsId’ or ‘Name-dsId’ parameter sets.

Type: Int32
Parameter Sets: Name-dsId, Id-dsId
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id

The ID of the host device associated with the new instance. Mandatory when using the ‘Id-dsId’ or ‘Id-dsName’ parameter sets.

Type: Int32
Parameter Sets: Id-dsName, Id-dsId
Aliases: DeviceId
Required: True
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Name

The name of the host device associated with the new instance. Mandatory when using the ‘Name-dsName’ or ‘Name-dsId’ parameter sets.

Type: String
Parameter Sets: Name-dsName, Name-dsId
Aliases: DeviceName
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

Fill ProgressAction Description

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

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

Inputs

None. You cannot pipe objects to this command.

Outputs

Returns LogicMonitor.DeviceDatasourceInstance object.

Notes

You must run Connect-LMAccount before running this command.