Skip to content

Remove-LMServiceTemplate

Syntax

Terminal window
Remove-LMServiceTemplate [-Id] <String> [[-DeleteHard] <Boolean>] [-ProgressAction <ActionPreference>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description

The Remove-LMServiceTemplate function removes a LogicMonitor Service template by ID.

Examples

Example 1

Terminal window
Remove-LMServiceTemplate -Id 6
This example removes the LogicMonitor Service template with ID 6 using soft delete.

Example 2

Terminal window
Remove-LMServiceTemplate -Id 6 -DeleteHard $true
This example removes the LogicMonitor Service template with ID 6 using hard delete.

Parameters

-Id

The ID of the Service template to remove. This parameter is mandatory.

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

-DeleteHard

Specifies whether to perform a hard delete. Default is $false (soft delete).

Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: False
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

None. You cannot pipe objects to this command.

Outputs

Returns a PSCustomObject containing the ID of the removed service template and a success message confirming the removal.

Notes