Set-LMDatasource
Syntax
Section titled “Syntax”Set-LMDatasource -Id <string> [-NewName <string>] [-DisplayName <string>] [-Description <string>] [-Tags <string[]>] [-TagsMethod <string>] [-appliesTo <string>] [-TechNotes <string>] [-PollingIntervalInSeconds <string>] [-Datapoints <psobject>] [-WhatIf] [-Confirm] [<CommonParameters>]Set-LMDatasource -Name <string> [-NewName <string>] [-DisplayName <string>] [-Description <string>] [-Tags <string[]>] [-TagsMethod <string>] [-appliesTo <string>] [-TechNotes <string>] [-PollingIntervalInSeconds <string>] [-Datapoints <psobject>] [-WhatIf] [-Confirm] [<CommonParameters>]Description
Section titled “Description”The Set-LMDatasource function modifies an existing datasource in LogicMonitor, allowing updates to its name, display name, description, applies to settings, and other properties.
Examples
Section titled “Examples”EXAMPLE 1
Section titled “EXAMPLE 1”Set-LMDatasource -Id 123 -NewName "UpdatedSource" -Description "New description"Updates the datasource with ID 123 with a new name and description.
Parameters
Section titled “Parameters”-appliesTo
Section titled “-appliesTo”Specifies the new applies to expression for the datasource.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Confirm
Section titled “-Confirm”Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameterDefaultValue: ''SupportsWildcards: falseAliases:- cfParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Datapoints
Section titled “-Datapoints”Specifies the datapoints configuration object for the datasource.
Type: System.Management.Automation.PSObjectDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Description
Section titled “-Description”Specifies the new description for the datasource.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-DisplayName
Section titled “-DisplayName”Specifies the new display name for the datasource.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''Specifies the ID of the datasource to modify. This parameter is mandatory when using the ‘Id’ parameter set.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: Id Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: true ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''Specifies the current name of the datasource. This parameter is mandatory when using the ‘Name’ parameter set.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: Name Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-NewName
Section titled “-NewName”Specifies the new name for the datasource.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-PollingIntervalInSeconds
Section titled “-PollingIntervalInSeconds”Specifies the polling interval in seconds.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''Specifies an array of tags to associate with the datasource.
Type: System.String[]DefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-TagsMethod
Section titled “-TagsMethod”Specifies how to handle existing tags. Valid values are “Add” or “Refresh”. Default is “Refresh”.
Type: System.StringDefaultValue: RefreshSupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-TechNotes
Section titled “-TechNotes”Specifies the new technical notes for the datasource.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-WhatIf
Section titled “-WhatIf”Runs the command in a mode that only reports what would happen without performing the actions.
Type: System.Management.Automation.SwitchParameterDefaultValue: ''SupportsWildcards: falseAliases:- wiParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''CommonParameters
Section titled “CommonParameters”This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.