KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

Powershell don't find Modules

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting
View previous topic :: View next topic  
Author Message
MirkoW



Joined: 01 Jul 2008
Posts: 205

PostPosted: Tue Jan 05, 2016 4:18 am    Post subject: Powershell don't find Modules Reply with quote

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.
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12792
Location: USA

PostPosted: Tue Jan 05, 2016 8:39 am    Post subject: Reply with quote

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

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
MirkoW



Joined: 01 Jul 2008
Posts: 205

PostPosted: Tue Jan 05, 2016 8:43 am    Post subject: Reply with quote

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

now it works.

Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index