< Back

New-TriggerNode

Sun Jan 19, 2020 5:44 pm

NAME New-TriggerNode



SYNOPSIS

Creates a new TriggerNode for modelling a PRTG Tree.





SYNTAX

New-TriggerNode [-Value] <NotificationTrigger> [<CommonParameters>]



New-TriggerNode [[-OnNotificationAction] <NameOrObject`1[]>] -ObjectId <int> [-SubId <int[]>] [-Type {State |

Speed | Volume | Threshold | Change}] [<CommonParameters>]





DESCRIPTION

The New-TriggerNode cmdlet creates a new TriggerNode object for modelling a PRTG Tree. Each TriggerNode object

encapsulates a single NotificationTrigger object.



If an existing NotificationTrigger object retrieved from the Get-NotificationTrigger cmdlet is not specified or

piped to the -Value parameter, one or more of -OnNotificationAction, or -SubId or Type parameters must be

specified to identify the object to encapsulate. If multiple values are returned as a result of these parameters,

a unique TriggerNode object will be created for each item.





PARAMETERS

-Value <NotificationTrigger>

The value to use for the node.



Required? true

Position? 0

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-OnNotificationAction <NameOrObject`1[]>

The OnNotificationAction to filter by. If this value is a string, can include wildcards.



Required? false

Position? 0

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ObjectId <int>

The ID of the object containing the notification triggers to encapsulate.



Required? true

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-SubId <int[]>

The Sub IDs of the notification triggers to encapsulate.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Type <TriggerType[]>

The type of notification triggers to encapsulate.



Possible values: State, Speed, Volume, Threshold, Change



Required? false

Position? named

Default value

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

The value to use for the node.





OUTPUTS



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



C:\\> Get-Trigger -ObjectId 1001 | New-TriggerNode



Create trigger nodes for all notification triggers under the object with ID 1001.



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



C:\\> New-TriggerNode -ObjectId 1001 *ticket* -Type State



Create trigger nodes for all State notification triggers under the object with ID 1001 that have an

OnNotificationAction whose name contains "ticket".



RELATED LINKS

Online version: https://github.com/lordmilko/PrtgAPI/wiki/Tree-Creation

Get-NotificationTrigger

New-SensorNode

New-DeviceNode

New-GroupNode

New-ProbeNode

New-PropertyNode