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.
Article Comments
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.
Jan, 2019 - Permalink
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
Jan, 2019 - Permalink
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
Jan, 2019 - Permalink
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?
Jan, 2019 - Permalink
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
Jan, 2019 - Permalink