Skip to content

Set-LMDevice

Syntax

Id

Terminal window
Set-LMDevice -Id <String> [-NewName <String>] [-DisplayName <String>] [-Description <String>]
[-PreferredCollectorId <Int32>] [-PreferredCollectorGroupId <Int32>] [-AutoBalancedCollectorGroupId <Int32>]
[-Properties <Hashtable>] [-HostGroupIds <String[]>] [-PropertiesMethod <String>] [-Link <String>]
[-DisableAlerting <Boolean>] [-EnableNetFlow <Boolean>] [-NetflowCollectorGroupId <Int32>]
[-NetflowCollectorId <Int32>] [-EnableLogCollector <Boolean>] [-LogCollectorGroupId <Int32>]
[-LogCollectorId <Int32>] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]

Name

Terminal window
Set-LMDevice -Name <String> [-NewName <String>] [-DisplayName <String>] [-Description <String>]
[-PreferredCollectorId <Int32>] [-PreferredCollectorGroupId <Int32>] [-AutoBalancedCollectorGroupId <Int32>]
[-Properties <Hashtable>] [-HostGroupIds <String[]>] [-PropertiesMethod <String>] [-Link <String>]
[-DisableAlerting <Boolean>] [-EnableNetFlow <Boolean>] [-NetflowCollectorGroupId <Int32>]
[-NetflowCollectorId <Int32>] [-EnableLogCollector <Boolean>] [-LogCollectorGroupId <Int32>]
[-LogCollectorId <Int32>] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

The Set-LMDevice function modifies an existing device in LogicMonitor, allowing updates to its name, display name, description, collector settings, and various other properties.

Examples

Example 1

Terminal window
Set-LMDevice -Id 123 -NewName "UpdatedDevice" -Description "New description"
Updates the device with ID 123 with a new name and description.

Parameters

-Id

Specifies the ID of the device to modify. This parameter is mandatory when using the ‘Id’ parameter set.

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

-Name

Specifies the current name of the device. This parameter is mandatory when using the ‘Name’ parameter set.

Type: String
Parameter Sets: Name
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewName

Specifies the new name for the device.

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

-DisplayName

Specifies the new display name for the device.

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

-Description

Specifies the new description for the device.

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

-PreferredCollectorId

Specifies the ID of the preferred collector for the device.

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

-PreferredCollectorGroupId

Specifies the ID of the preferred collector group for the device.

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

-AutoBalancedCollectorGroupId

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

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

-Properties

Specifies a hashtable of custom properties for the device.

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

-HostGroupIds

Specifies an array of host group IDs to associate with the device.

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

-PropertiesMethod

Specifies how to handle existing properties. Valid values are “Add”, “Replace”, or “Refresh”. Default is “Replace”.

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

Specifies the URL link associated with the device.

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

-DisableAlerting

Specifies whether to disable alerting for the device.

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

-EnableNetFlow

Specifies whether to enable NetFlow for the device.

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

-NetflowCollectorGroupId

Specifies the ID of the NetFlow collector group.

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

-NetflowCollectorId

Specifies the ID of the NetFlow collector.

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

-EnableLogCollector

Specifies whether to enable log collection for the device.

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

-LogCollectorGroupId

Specifies the ID of the log collector group.

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

-LogCollectorId

Specifies the ID of the log collector.

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
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

You can pipe objects containing Id properties to this function.

Outputs

Returns a LogicMonitor.Device object containing the updated device information.

Notes

This function requires a valid LogicMonitor API authentication.