Skip to content

Remove-LMDatasource

Terminal window
Remove-LMDatasource -Id <int> [-WhatIf] [-Confirm] [<CommonParameters>]
Terminal window
Remove-LMDatasource -Name <string> [-WhatIf] [-Confirm] [<CommonParameters>]
Terminal window
Remove-LMDatasource -DisplayName <string> [-WhatIf] [-Confirm] [<CommonParameters>]

The Remove-LMDatasource function removes a LogicMonitor datasource based on the specified parameters. It requires the user to be logged in and have valid API credentials.

Terminal window
Remove-LMDatasource -Id 123

Removes the datasource with the ID 123.

Terminal window
Remove-LMDatasource -Name "MyDatasource"

Removes the datasource with the name “MyDatasource”.

Terminal window
Remove-LMDatasource -DisplayName "My Datasource"

Removes the datasource with the display name “My Datasource”.

Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- cf
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

Specifies the display name of the datasource to be removed. This parameter is mandatory when using the ‘DisplayName’ parameter set and can be provided as a string.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: DisplayName
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

Specifies the ID of the datasource to be removed. This parameter is mandatory and can be provided as an integer.

Type: System.Int32
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Id
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

Specifies the name of the datasource to be removed. This parameter is mandatory when using the ‘Name’ parameter set and can be provided as a string.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Name
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

Runs the command in a mode that only reports what would happen without performing the actions.

Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- wi
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

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.