New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Powershell script don´t use installed module on PRTG server

Votes:

0

Your Vote:

Up

Down

I am using a powershell script which is using the FailoverClusters Module (which I installed through RSAT feature on PRTG server). Using local Powershell on PRTG server works fine - only in combination with a sensor over the webinterface I get the error "Antwort nich wohgeformt: "(Import-Module: The specified Module 'FailoverClusters' was not loaded...." but all needed files are stored in "C:\Windows\System32\WindowsPowerShell\v1.0\Modules\FailoverClusters" which is definetly the normal powershell module directory.

custom-sensor import-module powershell prtg

Created on Jan 22, 2019 10:27:35 AM by  duepstef (0) 1



5 Replies

Votes:

0

Your Vote:

Up

Down

Hi,

Did you try to run a PowerShell as the PRTG probe user respective the user that is executing the script on the device you have the sensor on?

Are you able to load the module there?

I see that you get a malformed response error from PRTG - cause the PowerShell response is "import module failed - module not loaded" - but I don't see details why this happened - a manual test with a run-as PowerShell session might reveal the root cause.

Regards

Florian Rossmark

www.it-admins.com

Created on Jan 22, 2019 2:34:49 PM by  Florian Rossmark (3,674) 2 2



Votes:

0

Your Vote:

Up

Down

I configured windows credentials on the group in which the device is located and selected to use that account instead of the probe account. I also first testet it directly on the PRTG server in a "run as" Powershell with the mentioned credetials (and found out that RSAT was not installed, fixed that). script is running perfectly on the PRTG server with the given credentials set on the group. So there is no security issue.

It seems that the module "FailoverClusters" is not loaded for the PRTG process altough it is automatically available when starting a powershell on the server.

Created on Jan 22, 2019 4:21:28 PM by  duepstef (0) 1



Votes:

0

Your Vote:

Up

Down

Could you put it in the same directory and load it via Import-Module $PSScriptRoot\Script1.ps1?
What error do you get there?


PRTG Scheduler | PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Jan 23, 2019 10:58:14 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

I tried to put it there but RSAT Tools are an OS implemented and stored in the verry basic Powershell directory and so got automatically loaded whenever you start powershell on the server, with any user. There is no way to load the FailoverClusters module by hand as described above because there are no *.ps1 files in there. It seems that the PRTG engine is "ignoring" that somehow

Created on Jan 31, 2019 3:44:42 PM by  duepstef (0) 1



Votes:

0

Your Vote:

Up

Down

You might have a x64 / x32 bit issue - I saw PS modules failing due to the architecture you are using...

Can you confirm this module runs in both modes?

Created on Jan 31, 2019 7:14:54 PM by  Florian Rossmark (3,674) 2 2



Please log in or register to enter your reply.


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.