Closed fabianadam closed 4 years ago
Hi @fabianadam,
Your Set-ObjectProperty
attempt with -RawParameters
is close, however your scheduledependency_
property should in fact be called scheduledependency
As per #18 and #133, you can achieve this as follows
$sensor | Set-ObjectProperty -RawParameters @{
scheduledependency = 0
dependencytype_ = 2
} -Force
The "inheritance" property in PRTG is always written without an underscore. And as per the wiki
PRTG does not support the retrieval of individual inheritance properties; as such, these properties must be retrieved via Get-ObjectProperty / Get-ObjectProperty -Raw (for supported and unsupported properties, respectively)
Regards, lordmilko
The target I would like to configure ping sensor as "master sensor for parent" with PrtgAPI in Powershell. Having made the modification in prtg UI the following two properties were changed: scheduledependency and dependencytype, the changes can be traced with
The issue When I tried to set "Master sensor for parent" (dependencytype_ = 2) with
or with
it does not work. No error message appears, but the value has not been changed. The only thing that works for me is to change the settings from any value to "Use parent" (dependencytype = 0) with
Any idea what should be done differently?
Additional context When I tried to get the property values one by one it worked for the dependencytype only, for the scheduledependency it drops an error: