New-LMDevice
Syntax
Section titled “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>] [-WhatIf] [-Confirm] [<CommonParameters>]Description
Section titled “Description”The New-LMDevice function creates a new device in LogicMonitor with specified configuration settings.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”#Create a new deviceNew-LMDevice -Name "server1" -DisplayName "Server 1" -PreferredCollectorId 123 -Properties @{"location"="datacenter1"}Parameters
Section titled “Parameters”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
Section titled “-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
Section titled “-Description”The description of the device.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 3Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False-PreferredCollectorId
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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: FalseThe link associated with the device.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 10Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False-DisableAlerting
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-NetflowCollectorId”The ID of the NetFlow collector.
Type: Int32Parameter Sets: (All)Aliases:
Required: FalsePosition: 14Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False-LogCollectorGroupId
Section titled “-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
Section titled “-LogCollectorId”The ID of the log collector.
Type: Int32Parameter Sets: (All)Aliases:
Required: FalsePosition: 16Default 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.Device object.
Section titled “Returns LogicMonitor.Device object.”You must run Connect-LMAccount before running this command.