-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Im getting all kinds of ps errors and i cant figure out whats wrong. Do you have any tips for me?
I have checked reqs many times but still cannot get passed this.
any tips?
Thanks
Mattias
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\AOS-CX\API.ps1:1 char:1
- class API {
-
The 'class' keyword is not supported in this version of the language.
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\AOS-CX\API.ps1:10 char:9
-
API() {} -
~
An expression was expected after '('.
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\AOS-CX\API.ps1:19 char:14
-
[string] subsystem_attributes_by_platform () { -
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token 'subsystem_attributes_by_platform' in expression or statement.
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\AOS-CX\API.ps1:19 char:48
-
[string] subsystem_attributes_by_platform () { -
~
An expression was expected after '('.
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\AOS-CX\API.ps1:42 char:12
-
[void] buildWebSession ([string]$setCookie) { -
~~~~~~~~~~~~~~~
Unexpected token 'buildWebSession' in expression or statement.
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\AOS-CX\API.ps1:80 char:12
-
[void] login () { -
~~~~~
Unexpected token 'login' in expression or statement.
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\AOS-CX\API.ps1:80 char:19
-
[void] login () { -
~
An expression was expected after '('.
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\AOS-CX\API.ps1:114 char:12
-
[void] logout () { -
~~~~~~
Unexpected token 'logout' in expression or statement.
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\AOS-CX\API.ps1:114 char:20
-
[void] logout () { -
~
An expression was expected after '('.
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\AOS-CX\API.ps1:142 char:14
-
[string] platform_data_name () { -
~~~~~~~~~~~~~~~~~~
Unexpected token 'platform_data_name' in expression or statement.
Not all parse errors were reported. Correct the reported errors and try again.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : ReservedKeywordNotAllowed
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\AOS-CX\PRTGXML.ps1:1 char:1
- class PRTGXML {
-
The 'class' keyword is not supported in this version of the language.
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\AOS-CX\PRTGXML.ps1:6 char:11
- PRTGXML() {
-
~
An expression was expected after '('.
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\AOS-CX\PRTGXML.ps1:14 char:10
- [void] addSensorChannel([Object] $Sensor) {
-
~~~~~~~~~~~~~~~~
Unexpected token 'addSensorChannel' in expression or statement.
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\AOS-CX\PRTGXML.ps1:65 char:12
- [string] getXml() {
-
~~~~~~
Unexpected token 'getXml' in expression or statement.
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\AOS-CX\PRTGXML.ps1:65 char:19
- [string] getXml() {
-
~
An expression was expected after '('.
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\AOS-CX\PRTGXML.ps1:83 char:12
- [string] getErrorXml([string] $ErrorMessage) {
-
~~~~~~~~~~~
Unexpected token 'getErrorXml' in expression or statement.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : ReservedKeywordNotAllowed
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\AOS-CX\PRTGChannel.ps1:1 char:1
- class PRTGChannel {
-
The 'class' keyword is not supported in this version of the language.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : ReservedKeywordNotAllowed
ConvertFrom-Json : Invalid object passed in, ':' or '}' expected. (1): {
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\AOS-CX-Sensor.ps1:28 char:75
-
$_settings = Get-Content -Path "$PSScriptRoot\AOS-CX\settings.json" | Conver ... -
~~~~~~- CategoryInfo : NotSpecified: (:) [ConvertFrom-Json], ArgumentException
- FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.Commands.ConvertFromJsonCommand
Settings file is empty
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\AOS-CX-Sensor.ps1:32 char:9
-
throw "Settings file is empty" -
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- CategoryInfo : OperationStopped: (Settings file is empty:String) [], RuntimeException
- FullyQualifiedErrorId : Settings file is empty