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

Custom Script only works if user is logged on

Votes:

0

Hello everyone,

I've created a script gives information about how many emails have been delivered to a certain mailbox in a certain amount of time.

When the sensor runs it will always return an "Access Denied" error message, except if I login on the probe or open any application with runas with the user that is supposed to run the script.

This script makes use of the CMDlet "New-PSSession" to connect to our Exchange Server.

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://$target/PowerShell/ -Credential $Cred -Authentication Kerberos

I've tried to give it credentials via the windows placeholders from PRTG and also tried to import the credentials via a text file. Another try was to let it run without any extra import of credentials.

But the picture was always the same. Access Denied - if the user is not logged in and Results - if it is logged in or runs any application.

custom exchange powershell

Created on Sep 26, 2022 9:37:17 AM

Last change on Sep 27, 2022 4:26:08 AM by  Felix Wiesneth [Paessler Support]



1 Reply

Votes:

0

Hey,

Please note that we cannot provide support for custom scripts. Therefore, we need to ask you to contact anyone who can provide you with a solution here.

Created on Sep 29, 2022 11:13:30 AM by  Marijan Horsky [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.