Set-LMDevice
Syntax
Section titled “Syntax”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>]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
Section titled “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
Section titled “Examples”Example 1
Section titled “Example 1”Set-LMDevice -Id 123 -NewName "UpdatedDevice" -Description "New description"Updates the device with ID 123 with a new name and description.Parameters
Section titled “Parameters”Specifies the ID of the device to modify. This parameter is mandatory when using the ‘Id’ parameter set.
Type: StringParameter Sets: IdAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: True (ByPropertyName)Accept wildcard characters: FalseSpecifies the current name of the device. This parameter is mandatory when using the ‘Name’ parameter set.
Type: StringParameter Sets: NameAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-NewName
Section titled “-NewName”Specifies the new name for the device.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-DisplayName
Section titled “-DisplayName”Specifies the new display name for the device.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-Description
Section titled “-Description”Specifies the new description for the device.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-PreferredCollectorId
Section titled “-PreferredCollectorId”Specifies the ID of the preferred collector for the device.
Type: Int32Parameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-PreferredCollectorGroupId
Section titled “-PreferredCollectorGroupId”Specifies the ID of the preferred collector group for the device.
Type: Int32Parameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-AutoBalancedCollectorGroupId
Section titled “-AutoBalancedCollectorGroupId”Specifies the ID of the auto-balanced collector group for the device.
Type: Int32Parameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-Properties
Section titled “-Properties”Specifies a hashtable of custom properties for the device.
Type: HashtableParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-HostGroupIds
Section titled “-HostGroupIds”Specifies an array of host group IDs to associate with the device.
Type: String[]Parameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-PropertiesMethod
Section titled “-PropertiesMethod”Specifies how to handle existing properties. Valid values are “Add”, “Replace”, or “Refresh”. Default is “Replace”.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: ReplaceAccept pipeline input: FalseAccept wildcard characters: FalseSpecifies the URL link associated with the device.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-DisableAlerting
Section titled “-DisableAlerting”Specifies whether to disable alerting for the device.
Type: BooleanParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-EnableNetFlow
Section titled “-EnableNetFlow”Specifies whether to enable NetFlow for the device.
Type: BooleanParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-NetflowCollectorGroupId
Section titled “-NetflowCollectorGroupId”Specifies the ID of the NetFlow collector group.
Type: Int32Parameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-NetflowCollectorId
Section titled “-NetflowCollectorId”Specifies the ID of the NetFlow collector.
Type: Int32Parameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-EnableLogCollector
Section titled “-EnableLogCollector”Specifies whether to enable log collection for the device.
Type: BooleanParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-LogCollectorGroupId
Section titled “-LogCollectorGroupId”Specifies the ID of the log collector group.
Type: Int32Parameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-LogCollectorId
Section titled “-LogCollectorId”Specifies the ID of the log collector.
Type: Int32Parameter Sets: (All)Aliases:
Required: FalsePosition: 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”You can pipe objects containing Id properties to this function.
Section titled “You can pipe objects containing Id properties to this function.”Outputs
Section titled “Outputs”Returns a LogicMonitor.Device object containing the updated device information.
Section titled “Returns a LogicMonitor.Device object containing the updated device information.”This function requires a valid LogicMonitor API authentication.