What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags

View all Tags

change MS365 Mailbox Sensor Settings with Powershell



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

m365 mail powershell prtg prtgapi script

Created on Feb 1, 2023 1:11:16 PM

3 Replies



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

Created on Feb 1, 2023 3:22:37 PM by  Moritz Heller [Paessler Support]



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?

Created on Feb 2, 2023 2:52:53 PM

Last change on Feb 3, 2023 7:57:38 AM by  Moritz Heller [Paessler Support]



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:


Please change all bold parameters accordingly.

Created on Feb 6, 2023 7:49:57 AM by  Moritz Heller [Paessler Support]

Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.