Hi
I have written powershell script to extract the the information related to sensors like name , id , channel values , priority , interval etc . But I am not finding suitable command to extract the information Script name from relevant sensor . Sensor setting ---> script .
The sensors are in Passelers monitoring tool PRTG . I am extracting data from PRTG server with the help of Powershell script ... but not able to extract data of field called as script ( used to mention script name , used to run in that sensor)
Script Snippet
'Device: ' + $sensor.Device | Out-File -FilePath $outFile -Append 'Type: ' + $sensor.Type | Out-File -FilePath $outFile -Append 'Id: ' + $sensor.ID | Out-File -FilePath $outFile -Append 'Name: ' + $sensor.Name | Out-File -FilePath $outFile -Append
- $sensor | Format-Table -AutoSize | Out-File -FilePath $outFile -Append $query | Format-Table -AutoSize | Out-File -FilePath $outFile -Append
- $sensor | Get-ObjectProperty | Out-File -FilePath $outFile -Append $sensor | Get-ObjectProperty Tags,IntervalErrorMode,Priority,Interval | Out-File -FilePath $outFile -Append $sensor | Get-Channel | Format-Table -AutoSize | Out-File -FilePath $outFile -Append
May you please share the script format to extract this info
Article Comments
Attention: This article is a record of a conversation with the Paessler support team. The information in this conversation is not updated to preserve the historical record. As a result, some of the information or recommendations in this conversation might be out of date.
I assume you are using the PrtgAPI module (https://github.com/lordmilko/PrtgAPI/).
using the "Get-ObjectProperty" Cmdlet you can get all properties from the sensors like
Jul, 2020 - Permalink