Set-LMPropertysource
Syntax
Id
Set-LMPropertysource -Id <String> [-NewName <String>] [-Description <String>] [-appliesTo <String>] [-TechNotes <String>] [-Tags <String[]>] [-TagsMethod <String>] [-Group <String>] [-ScriptType <String>] [-Script <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Name
Set-LMPropertysource -Name <String> [-NewName <String>] [-Description <String>] [-appliesTo <String>] [-TechNotes <String>] [-Tags <String[]>] [-TagsMethod <String>] [-Group <String>] [-ScriptType <String>] [-Script <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Description
The Set-LMPropertysource function modifies an existing property source in LogicMonitor.
Examples
Example 1
Set-LMPropertysource -Id 123 -NewName "UpdatedSource" -Description "New description" -Tags @("prod", "windows")Updates the property source with new name, description, and tags.
Parameters
-Id
Specifies the ID of the property source to modify.
Type: StringParameter Sets: IdAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: True (ByPropertyName)Accept wildcard characters: False
-Name
Specifies the current name of the property source.
Type: StringParameter Sets: NameAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-NewName
Specifies the new name for the property source.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-Description
Specifies the description for the property source.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-appliesTo
Specifies the applies to expression for the property source.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-TechNotes
Specifies technical notes for the property source.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-Tags
Specifies an array of tags to associate with the property source.
Type: String[]Parameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-TagsMethod
Specifies how to handle tags. Valid values: “Add” (append to existing), “Refresh” (replace existing).
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: RefreshAccept pipeline input: FalseAccept wildcard characters: False
-Group
Specifies the group for the property source.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-ScriptType
Specifies the script type. Valid values: “embed”, “powerShell”.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-Script
Specifies the script content.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault 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.
Outputs
Returns a LogicMonitor.Propertysource object containing the updated configuration.
Notes
This function requires a valid LogicMonitor API authentication.