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

Powershell script don´t use installed module on PRTG server

Votes:

0

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



5 Replies

Votes:

0

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



Votes:

0

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



Votes:

0

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

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



Votes:

1

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




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.