lordmilko / PrtgAPI

C#/PowerShell interface for PRTG Network Monitor
MIT License
301 stars 37 forks source link

Get-SensorTarget fails with "Could not authenticate to PRTG; the specified username and password were invalild" #272

Closed gjh71 closed 2 years ago

gjh71 commented 2 years ago

We use powershell to configure new probes and add sensors to them. This is not a daily job, but the script used to work ok let's say about a month ago.

I can get the device using:

get-probe "db01"|get-device *sqlserver

But if I then want to find specific (advanced) sensors: that fails:

get-probe "db01"|get-device *server|Get-SensorTarget ExeXml -name "GetPrtgSqlLastDatabaseBackup.ps1" -Parameters

It results in: "Get-SensorTarget: Could not authenticate to PRTG; the specified username and password were invalid." The file 'GetPrtgSqlLastDatabaseBackup.ps1' is present on the probe.

Version info: prtgapi: 0.9.16 (hosted) prtg: 22.1.74.1869

lordmilko commented 2 years ago

Duplicate of #268