What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags

View all Tags

Authenticatation with Custom exe sensors




I just a custom exe sensor written, and it works fine when I run it again machines in the same domain as the PRTG server.

But when I try to point my skill to another domain, it fails.

It short, the script counts the number of files in a folder

The only place I can see for setting credentials is on the device, under "credentials for windows systems". But I dont think PTRG uses these credentials for custom exe sensors. (I have tried)

The script works from the console of the server once I authenticate in windows. (but still does not work in PRTG)

So, how do I pass on the credentials to the custom exe script that in turn queries another domain?


authentication custom-sensor windows

Created on Jul 17, 2014 8:15:09 AM

3 Replies



That depends on how you execute the folder count command on the remote host. If you're using Invoke-Command, you can give the script username and password and create a credential object:

  1. Generate Credentials Object $SecPasswd = ConvertTo-SecureString $Password -AsPlainText -Force $Credentials= New-Object System.Management.Automation.PSCredential ($Username, $secpasswd)

Username should be in the following format: domainname-or-computername\username

Make sure to put the password in the parameter in quotes.

Created on Jul 17, 2014 8:57:51 AM by  Stephan Linke [Paessler Support]



Thanks for the reply.

I would prefer to leave the script with no authentication options in it (So i can use the same script over multiple domains).

If i cannot tell PRTG to use the "windows credentials" for a custom exe script, them I might be forced to has a different set of scripts per domain.

Created on Jul 17, 2014 11:57:40 AM



Lets say your script takes -UserName and -Password as parameters. Make it look like this:

-UserName %windowsdomain\%windowsuser -Password "%windowspassword"

Then it uses the credentials that you've entered for the device :)

Created on Jul 18, 2014 9:36:24 AM by  Stephan Linke [Paessler Support]

Last change on Jul 18, 2014 9:36:36 AM by  Stephan Linke [Paessler Support]

Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.