Hello!
I have a notification template "My notification".
I want to create a notification for the group:
get-group -id 67572 | Add-NotificationTrigger $Notif
But I get an error
Add-NotificationTrigger : Cannot bind argument to parameter 'Parameters' because it is null.
At line:1 char:54
+ get-group -id 67572 | Add-NotificationTrigger $Notif
+ ~~~~~~
+ CategoryInfo : InvalidData: (:) [Add-NotificationTrigger], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,PrtgAPI.PowerShell.Cmdlets.AddNotificationTrigger
I try to clone from existing
get-group -id 67572 | Get-Trigger -Type State -Inherited $false | Clone-Object -DestinationId 78120
but also a mistake
Clone-Object : Requested value 'Ошибка' was not found.
At line:1 char:74
+ ... ger -Type State -Inherited $false | Clone-Object -DestinationId 78120
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Copy-Object], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,PrtgAPI.PowerShell.Cmdlets.CloneObject
What am I doing wrong?
How to create a notification from a template?
How to create a notification through cloning?