8000 Get-SensorHistory produces an unexpected error: Input string was not in a correct format. · Issue #123 · lordmilko/PrtgAPI · GitHub
[go: up one dir, main page]

Skip to content

Get-SensorHistory produces an unexpected error: Input string was not in a correct format. #123

@robm82

Description

@robm82

I am trying to write a script to get disk space usage over the past 30 days, which does work but on a handful of sensors I get a weird error. I have also tried to use Get-SensorHistory -id 11079 which again produces the same error, so I know that it isn't my script, but there appears to be something wrong with the PrtgAPI PowerShell module? Below is the full output:

PS C:\> Get-SensorHistory -Id 11079
Get-SensorHistory : Input string was not in a correct format.
At line:1 char:1
+ Get-SensorHistory -Id 11079
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-SensorHistory], FormatExc
   eption
    + FullyQualifiedErrorId : System.FormatException,PrtgAPI.PowerShell.Cmdlet
   s.GetSensorHistory

Here is the output of Get-PrtgClient -Diagnostic:

PSVersion      : 5.1.18362.145
PSEdition      : Desktop
OS             : Microsoft Windows 10 Enterprise
PrtgAPIVersion : 0.9.10
Culture        : en-GB
CLRVersion     : .NET Framework 4.8 (528040)
PrtgVersion    : 19.4.54.1506
PrtgLanguage   : english.lng

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssues that have been confirmed to be bugs in PrtgAPI and will be fixed in a future version

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0