New-LMDeviceDatasourceInstance
Syntax
Section titled “Syntax”Name-dsName
Section titled “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>] [-WhatIf] [-Confirm] [<CommonParameters>]Id-dsName
Section titled “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>] [-WhatIf] [-Confirm] [<CommonParameters>]Name-dsId
Section titled “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>] [-WhatIf] [-Confirm] [<CommonParameters>]Id-dsId
Section titled “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>] [-WhatIf] [-Confirm] [<CommonParameters>]Description
Section titled “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
Section titled “Examples”Example 1
Section titled “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
Section titled “Parameters”-DisplayName
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-Description”The description of the new instance.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-Properties
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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: FalseThe 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: FalseThe 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-WhatIf
Section titled “-WhatIf”Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameterParameter Sets: (All)Aliases: wi
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-Confirm
Section titled “-Confirm”Prompts you for confirmation before running the cmdlet.
Type: SwitchParameterParameter Sets: (All)Aliases: cf
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-ProgressAction
Section titled “-ProgressAction”Fill ProgressAction Description
Type: ActionPreferenceParameter Sets: (All)Aliases: proga
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseCommonParameters
Section titled “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
Section titled “Inputs”None. You cannot pipe objects to this command.
Section titled “None. You cannot pipe objects to this command.”Outputs
Section titled “Outputs”Returns LogicMonitor.DeviceDatasourceInstance object.
Section titled “Returns LogicMonitor.DeviceDatasourceInstance object.”You must run Connect-LMAccount before running this command.