New-LMDeviceDatasourceInstance
Syntax
Name-dsName
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
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
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
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
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: StringParameter Sets: (All)Aliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-WildValue
The wild value of the new instance.
Type: StringParameter Sets: (All)Aliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-WildValue2
The second wild value of the new instance.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-Description
The description of the new instance.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-Properties
A hashtable of custom properties for the new instance.
Type: HashtableParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-StopMonitoring
Specifies whether to stop monitoring the new instance. Default is $false.
Type: BooleanParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False
-DisableAlerting
Specifies whether to disable alerting for the new instance. Default is $false.
Type: BooleanParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False
-InstanceGroupId
The ID of the instance group to which the new instance belongs.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept 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: StringParameter Sets: Name-dsName, Id-dsNameAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept 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: Int32Parameter Sets: Name-dsId, Id-dsIdAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept 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: Int32Parameter Sets: Id-dsName, Id-dsIdAliases: DeviceId
Required: TruePosition: NamedDefault value: 0Accept pipeline input: FalseAccept 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: StringParameter Sets: Name-dsName, Name-dsIdAliases: DeviceName
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-ProgressAction
Fill ProgressAction Description
Type: ActionPreferenceParameter Sets: (All)Aliases: proga
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept 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.