Skip to content

Remove-LMServiceTemplate

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

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

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

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

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

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

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

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

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

None. You cannot pipe objects to this command.

Section titled “None. You cannot pipe objects to this command.”

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

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