New-LMDevice
Syntax
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
#Create a new deviceNew-LMDevice -Name "server1" -DisplayName "Server 1" -PreferredCollectorId 123 -Properties @{"location"="datacenter1"}
Parameters
-Name
The name of the device. This parameter is mandatory.
Type: StringParameter Sets: (All)Aliases:
Required: TruePosition: 1Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-DisplayName
The display name of the device. This parameter is mandatory.
Type: StringParameter Sets: (All)Aliases:
Required: TruePosition: 2Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-Description
The description of the device.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 3Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-PreferredCollectorId
The ID of the preferred collector for the device. This parameter is mandatory.
Type: Int32Parameter Sets: (All)Aliases:
Required: TruePosition: 4Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-PreferredCollectorGroupId
The ID of the preferred collector group for the device.
Type: Int32Parameter Sets: (All)Aliases:
Required: FalsePosition: 5Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-AutoBalancedCollectorGroupId
The ID of the auto-balanced collector group for the device.
Type: Int32Parameter Sets: (All)Aliases:
Required: FalsePosition: 6Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-DeviceType
The type of the device. Defaults to 0.
Type: Int32Parameter Sets: (All)Aliases:
Required: FalsePosition: 7Default value: 0Accept pipeline input: FalseAccept wildcard characters: False
-Properties
A hashtable of custom properties for the device.
Type: HashtableParameter Sets: (All)Aliases:
Required: FalsePosition: 8Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-HostGroupIds
An array of host group IDs. Dynamic group IDs will be ignored.
Type: String[]Parameter Sets: (All)Aliases:
Required: FalsePosition: 9Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-Link
The link associated with the device.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 10Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-DisableAlerting
Whether to disable alerting for the device.
Type: BooleanParameter Sets: (All)Aliases:
Required: FalsePosition: 11Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-EnableNetFlow
Whether to enable NetFlow for the device.
Type: BooleanParameter Sets: (All)Aliases:
Required: FalsePosition: 12Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-NetflowCollectorGroupId
The ID of the NetFlow collector group.
Type: Int32Parameter Sets: (All)Aliases:
Required: FalsePosition: 13Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-NetflowCollectorId
The ID of the NetFlow collector.
Type: Int32Parameter Sets: (All)Aliases:
Required: FalsePosition: 14Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-LogCollectorGroupId
The ID of the log collector group.
Type: Int32Parameter Sets: (All)Aliases:
Required: FalsePosition: 15Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-LogCollectorId
The ID of the log collector.
Type: Int32Parameter Sets: (All)Aliases:
Required: FalsePosition: 16Default 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.Device object.
Notes
You must run Connect-LMAccount before running this command.