Powershell don't find Modules

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
MirkoW
Posts: 210
Joined: Tue Jul 01, 2008 6:51 am

Powershell don't find Modules

Post by MirkoW »

Hello,

i've installed RMA on Windows 2012 R2 to run Powershell Scripts.

i Need the failovercluster-module but it is not possible to load it:

[11:12:20] Agent: VS-RFSW12-DBP2 is going to execute "GetClusterGroupOwner" script ...
[11:12:21] Script started, invalid result received:
----------
Import-Module : The specified module 'FailoverClusters' was not loaded because no valid module file was found in any
module directory.
At C:\Users\fstecadm\AppData\Local\Temp\tmp-9428-6.ps1:1 char:1
+ Import-Module FailoverClusters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (FailoverClusters:String) [Import-Module], FileNotFoundException
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

Get-ClusterGroup : The term 'Get-ClusterGroup' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
----------



Follow Script Settings i use:
Start-CMD:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy ByPass -File %Script% %Params%
already testet it with powershell.exe -ExecutionPolicy ByPass -File %Script% %Params%

Import-Module FailoverClusters
Get-ClusterGroup


If i use this command on local powershell console, it works without any issues.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Try to set the following path
c:\Windows\Sysnative\windowspowershell\v1.0\powershell.exe -ExecutionPolicy ByPass -File %Script% %Params%

Regards
Alex
MirkoW
Posts: 210
Joined: Tue Jul 01, 2008 6:51 am

Post by MirkoW »

Wow, i already read the threat with this solution but i was not sure if this was the reason.

now it works.

Thanks
Post Reply