Quantcast
Channel: Questions Tagged “powershell” — Paessler Knowledge Base
Viewing all articles
Browse latest Browse all 168

Custom Script only works if user is logged on

$
0
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.


Viewing all articles
Browse latest Browse all 168

Latest Images

Trending Articles





Latest Images