Skip to content

New-LMDevice

Syntax

Terminal window
New-LMDevice [-Name] <String> [-DisplayName] <String> [[-Description] <String>] [-PreferredCollectorId] <Int32>
[[-PreferredCollectorGroupId] <Int32>] [[-AutoBalancedCollectorGroupId] <Int32>] [[-DeviceType] <Int32>]
[[-Properties] <Hashtable>] [[-HostGroupIds] <String[]>] [[-Link] <String>] [[-DisableAlerting] <Boolean>]
[[-EnableNetFlow] <Boolean>] [[-NetflowCollectorGroupId] <Int32>] [[-NetflowCollectorId] <Int32>]
[[-LogCollectorGroupId] <Int32>] [[-LogCollectorId] <Int32>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]

Description

The New-LMDevice function creates a new device in LogicMonitor with specified configuration settings.

Examples

Example 1

Terminal window
#Create a new device
New-LMDevice -Name "server1" -DisplayName "Server 1" -PreferredCollectorId 123 -Properties @{"location"="datacenter1"}

Parameters

-Name

The name of the device. This parameter is mandatory.

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

-DisplayName

The display name of the device. This parameter is mandatory.

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

-Description

The description of the device.

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

-PreferredCollectorId

The ID of the preferred collector for the device. This parameter is mandatory.

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

-PreferredCollectorGroupId

The ID of the preferred collector group for the device.

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

-AutoBalancedCollectorGroupId

The ID of the auto-balanced collector group for the device.

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

-DeviceType

The type of the device. Defaults to 0.

Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Properties

A hashtable of custom properties for the device.

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

-HostGroupIds

An array of host group IDs. Dynamic group IDs will be ignored.

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

The link associated with the device.

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

-DisableAlerting

Whether to disable alerting for the device.

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

-EnableNetFlow

Whether to enable NetFlow for the device.

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

-NetflowCollectorGroupId

The ID of the NetFlow collector group.

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

-NetflowCollectorId

The ID of the NetFlow collector.

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

-LogCollectorGroupId

The ID of the log collector group.

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

-LogCollectorId

The ID of the log collector.

Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 16
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.Device object.

Notes

You must run Connect-LMAccount before running this command.