Jannos-443 / PRTG-VMware-Snapshot

PRTG VMware Snapshot Monitoring
MIT License
13 stars 2 forks source link

XML parser mismatch error #2

Closed RedPeace closed 3 years ago

RedPeace commented 3 years ago

Hi,

does not work for me. Neither in PRTG nor standalone.

Error:

XML: XML Parser mismatch: Wanted , got -- JSON: Das zurückgelieferte JSON entspricht nicht der erwarteten Struktur (No mapping for the Unicode character exists in the target multi-byte code page). (Code: PE231)

and

XML: XML Parser mismatch: Wanted , got </s ... + ~ Das kaufm�nnische Und-Zeichen (&) ist nicht zul�ssig. Der &-Operator ist f�r eine zuk�nftige Verwendung reserviert. Verwenden Sie das kaufm�nnische Und-Zeichen in doppelten Anf�hrungszeichen ("&"), um es als Teil einer Zeichenfolge zu �bergeben. In C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXEXML\PRTG-VMware-Snapshot.ps1:218 Zeichen:165 + ... ck Link--secondary no-underline f5 Bump-link--hover"> -- JSON: Das zurückgelieferte JSON entspricht nicht der erwarteten Struktur (No mapping for the Unicode character exists in the target multi-byte code page). (Code: PE231)

Any hint for me?

Thank you.

Best regards!

Gero

Jannos-443 commented 3 years ago

Hi,

did you use the latest Script and ' instead of " for the Parameter? If yes could you please provide your Parameter and the standalone output?

Best regards.

RedPeace commented 3 years ago

Hi,

yes, latest script version.

Parameter:

-ViServer 'FQDN' -User 'administrator@vsphere.local' -Password 'PASSWORD'

Standalone output:

PS C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML> .\PRTG-VMWare-Status.ps1 -ViServer'FQDN' -User 'administrator@vsphere.local' -Password 'PASSWORD'

In C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\PRTG-VMWare-Status.ps1:188 Zeichen:23
+                   Sign&nbsp;up
+                       ~
Das kaufmännische Und-Zeichen (&) ist nicht zulässig. Der &-Operator ist für eine zukünftige Verwendung reserviert. Verwenden Sie das kaufmännische Und-Zeichen in doppelten Anführungszeichen ("&"), um es als
Teil einer Zeichenfolge zu übergeben.
In C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\PRTG-VMWare-Status.ps1:216 Zeichen:189
+ ... ata-ga-click="(Logged out) Header, go to Features">Features <span cla ...
+                                                                 ~
Der Operator "<" ist für zukünftige Versionen reserviert.
In C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\PRTG-VMWare-Status.ps1:216 Zeichen:269
+ ... nk-symbol float-right text-normal color-text-tertiary pr-3">&rarr;</s ...
+                                                                 ~
Das kaufmännische Und-Zeichen (&) ist nicht zulässig. Der &-Operator ist für eine zukünftige Verwendung reserviert. Verwenden Sie das kaufmännische Und-Zeichen in doppelten Anführungszeichen ("&"), um es als
Teil einer Zeichenfolge zu übergeben.
In C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\PRTG-VMWare-Status.ps1:218 Zeichen:165
+ ... ck Link--secondary no-underline f5 Bump-link--hover">Mobile <span cla ...
+                                                                 ~
Der Operator "<" ist für zukünftige Versionen reserviert.
In C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\PRTG-VMWare-Status.ps1:218 Zeichen:245
+ ... nk-symbol float-right text-normal color-text-tertiary pr-3">&rarr;</s ...
+                                                                 ~
Das kaufmännische Und-Zeichen (&) ist nicht zulässig. Der &-Operator ist für eine zukünftige Verwendung reserviert. Verwenden Sie das kaufmännische Und-Zeichen in doppelten Anführungszeichen ("&"), um es als
Teil einer Zeichenfolge zu übergeben.
In C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\PRTG-VMWare-Status.ps1:219 Zeichen:176
+ ... k Link--secondary no-underline f5 Bump-link--hover">Actions <span cla ...
+                                                                 ~
Der Operator "<" ist für zukünftige Versionen reserviert.
In C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\PRTG-VMWare-Status.ps1:219 Zeichen:256
+ ... nk-symbol float-right text-normal color-text-tertiary pr-3">&rarr;</s ...
+                                                                 ~
Das kaufmännische Und-Zeichen (&) ist nicht zulässig. Der &-Operator ist für eine zukünftige Verwendung reserviert. Verwenden Sie das kaufmännische Und-Zeichen in doppelten Anführungszeichen ("&"), um es als
Teil einer Zeichenfolge zu übergeben.
In C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\PRTG-VMWare-Status.ps1:220 Zeichen:182
+ ... ink--secondary no-underline f5 Bump-link--hover">Codespaces <span cla ...
+                                                                 ~
Der Operator "<" ist für zukünftige Versionen reserviert.
In C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\PRTG-VMWare-Status.ps1:220 Zeichen:262
+ ... nk-symbol float-right text-normal color-text-tertiary pr-3">&rarr;</s ...
+                                                                 ~
Das kaufmännische Und-Zeichen (&) ist nicht zulässig. Der &-Operator ist für eine zukünftige Verwendung reserviert. Verwenden Sie das kaufmännische Und-Zeichen in doppelten Anführungszeichen ("&"), um es als
Teil einer Zeichenfolge zu übergeben.
In C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\PRTG-VMWare-Status.ps1:221 Zeichen:178
+ ...  Link--secondary no-underline f5 Bump-link--hover">Packages <span cla ...
+                                                                 ~
Der Operator "<" ist für zukünftige Versionen reserviert.
Es wurden nicht alle Analysefehler berichtet. Korrigieren Sie die berichteten Fehler, und versuchen Sie es erneut.
    + CategoryInfo          : ParserError: (:) [], ParseException
    + FullyQualifiedErrorId : AmpersandNotAllowed

Greetings!

RedPeace commented 3 years ago

@Jannos-443 Any idea?

Greetings!

Jannos-443 commented 3 years ago

@RedPeace you are having issues with "PRTG-VMWare-Status" not "PRTG-VMware-Snapshot" am I right?

Are you having VMs with &, #, < or > in there names? Which VCenter Version are you running?

The error is very unusual

Jannos-443 commented 3 years ago

Please try to download the Script again and not just copy it from GitHub.

Here is someone else with an Issue like this: https://github.com/Sycnex/Windows10Debloater/issues/168

RedPeace commented 3 years ago

Fixed! I've always downloaded the PS Script (not copy and paste). Now i've used "Code>Download ZIP" and extracted the script from the ZIP file. This worked.

Thank you!

Best regards Gero