-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get-ObjectProperty : Could not deserialize value 'WriteResultToDisk' as it is not a valid member of type 'PrtgAPI.DebugMode' #333
Comments
The
You can see that "WriteResultToDisk" is slightly different. I will need to investigate whether this is unique to this sensor type or PRTG have renamed one of the previous historical values In the meantime, you can work around this by instead asking PrtgAPI to emit raw object properties Get-Sensor $clientSubject | Get-ObjectProperty -Raw |
Thanks lordmilko, When I try and run that command it doesn't return anything. It could be that that sensor type doesn't have any Raw values? I just want to change the Search for field value under Filter by Subject |
Can you confirm that You will need to set the |
It doesn't return anything, but it doesn't return an error either. The $clientSubject variable is working and I have confirmed that when I just run $clientSubject it does output the intended variable it is storing. |
This (likely) means the For the purposes of this issue, can you try and do |
If the sensor name contains wildcard characters that can cause an issue: specifically |
I got it working now. Thanks @lordmilko! For anyone else, this is the PowerShell code required:
|
I get a similar result for the sensors of type REST Custom v2 (BETA). PRTG 24.1.92.1554.
So it seems some PRTG sensors can now also return a string instead of integer values? |
Can someone please assist with the following error?
I'm trying to customise the "microsoft365sensor" type. However, when I try to pipe Get-Object Property to Get-Sensor it throws the following error (I want to change the Search for field under Filter by Subject, but I don't know what the -RawProperty would be):
`Get-Sensor -Name $clientSubject | Get-ObjectProperty
Get-ObjectProperty : Could not deserialize value 'WriteResultToDisk' as it is not a valid member of type 'PrtgAPI.DebugMode'. Could not process XML '<injected_writeresult>WriteResultToDisk</injected_writeresult>'.
At line:1 char:35
The text was updated successfully, but these errors were encountered: