Hello all,

We are currently checking a mailbox with the M365 Mailbox Sensor and looking for certain mails which give an error depending on the subject.

Now we would like to change via Powershell on all sensors the parameter "Maximum Age (Minutes)". Unfortunately, I can't find a parameter to change this. Can someone help me with this?

Thanks and greetings Michi


Article Comments

Hi there,

Did you already checked the API section "Object Manipulation": https://www.paessler.com/manuals/prtg/object_manipulation

The filed can be checked via the admin tool of your browser mostly it's with an underscore at the end which is not needed in the API call.

If the API is not suitable, please check out this third party API: https://github.com/lordmilko/PrtgAPI


Feb, 2023 - Permalink

Thank you very much for your answer.

For the script I already use the PrtgAPI from lordmilko. Only there I do not get further. With the command Get-ObjectProperty I get the following error: Get-ObjectProperty: Could not deserialize value 'DiscardResult' as it is not a valid member of type 'PrtgAPI.DebugMode'. Could not process XML '<injected_writeresult>DiscardResult</injected_writeresult>'.

I also tried to get some information about the HTTP API, but I can't really find a solution. Can you help me there and maybe even make an example how the solution could look like?


Feb, 2023 - Permalink

Hi there,

please note that we cannot offer support for a third party API. However, with the native PRTG API I could change the value via this call:

/api/setobjectproperty.htm?id=id_of_object&name=paessler-microsoft365-mailbox_section-mailbox_group-filter_max_age&value=your_value&username=your_user&passhash=your_passhash

Please change all bold parameters accordingly.


Feb, 2023 - Permalink