< Back

Remove-NotificationTrigger

Sun Jan 19, 2020 5:44 pm

NAME Remove-NotificationTrigger



SYNOPSIS

Removes a notification trigger from a PRTG Object.





SYNTAX

Remove-NotificationTrigger -Trigger <NotificationTrigger> [-Force <SwitchParameter>] [<CommonParameters>]





DESCRIPTION

The Remove-NotificationTrigger cmdlet removes a notification trigger from a PRTG Object. Notification triggers can

only be removed from the objects on which they are explicitly defined. Attempting to remove a notification trigger

from an object which inherits the trigger from its parent will generate an exception.



If invoked with no arguments other than the notification trigger to be deleted, Remove-NotificationTrigger will

prompt for confirmation of each trigger to be deleted. If you wish to remove multiple triggers, it is recommended

to first run Remove-NotificationTrigger with the -WhatIf parameter, and then re-run with the -Force parameter if

the results of -WhatIf look correct



When invoked with -WhatIf, Remove-NotificationTrigger will list all notification triggers that would have been

removed, along with the OnNotificationAction and Sub ID of the notification trigger and the object ID of the

object to which the triggers are applied. Even if you are sure of the triggers you wish to delete, it is

recommended to always run with -WhatIf first to confirm you have specified the correct triggers and that PrtgAPI

has interpreted your request in the way you intended.





PARAMETERS

-Trigger <NotificationTrigger>

Notification trigger to remove.



Required? true

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Force <SwitchParameter>

Forces a notification trigger to be removed without displaying a confirmation prompt.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

PrtgAPI.NotificationTrigger

Notification trigger to remove.





OUTPUTS



---------- EXAMPLE 1 ----------



C:\\> Get-Device dc-1 | Get-NotificationTrigger | Remove-NotificationTrigger -WhatIf

"What if: Performing operation "Remove-NotificationTrigger" on target "'Email to Administrator' (Object ID: 2002,

Sub ID: 1)""



Preview what will happen when you attempt all triggers from all devices with the name 'dc-1'



---------- EXAMPLE 2 ----------



C:\\> Get-Device dc-1 | Get-NotificationTrigger | Remove-NotificationTrigger -Force



Remove all notification triggers from devices named 'dc-1' without prompting for confirmation.



RELATED LINKS

Online version: https://github.com/lordmilko/PrtgAPI/wi ... s#remove-1

Get-NotificationTrigger