Skip to content

New-LMDeviceDatasourceInstance

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>]
[-WhatIf] [-Confirm] [<CommonParameters>]
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>]
[-WhatIf] [-Confirm] [<CommonParameters>]
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>]
[-WhatIf] [-Confirm] [<CommonParameters>]
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>] [-WhatIf]
[-Confirm] [<CommonParameters>]

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

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.

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

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

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

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

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

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

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

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

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

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

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

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

Shows what would happen if the cmdlet runs. The cmdlet is not run.

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

Prompts you for confirmation before running the cmdlet.

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

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

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

None. You cannot pipe objects to this command.

Section titled “None. You cannot pipe objects to this command.”

Returns LogicMonitor.DeviceDatasourceInstance object.

Section titled “Returns LogicMonitor.DeviceDatasourceInstance object.”

You must run Connect-LMAccount before running this command.