Closed zarat closed 3 months ago
You can set the schedule using Set-ObjectProperty
after the sensor has been created. See #155 for an example of how to do this
Hi and thank you for the quick response. Sorry for my bad english but i am asking for the schedule returned by Get-PRTGSchedule not the notifications returned by Get-NotificationAction. The time plan at which hours a sensor is scanned.
The first example in #155 shows how to do this
Get-Probe -Id 17834 | Set-ObjectProperty -RawParameters @{
"scheduledependency" = 0
"schedule_" = Get-PrtgSchedule "Alerting Hours 7am ~11pm"
} -Force
Substitute Get-Probe
with Get-Sensor
What's going on?
I'm trying to add a new sensor using Add-Sensor and New-SensorParameters. Is there a way to add a schedule to a sensor using the API? I found this thread https://kb.paessler.com/en/topic/66047-use-api-to-assign-schedules-to-sensors but it changes the schedule of a device, not a sensor. Are the parameters used by New-SensorParameters all the available ones?
Friendly regards
Due Dilligance