Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot import modules in Powershell

Tags:

powershell

I cannot import any modules in Powershell due to this error:

PS C:\Users\Administrator> import-module failoverclusters
The term 'import-module' is not recognized as a cmdlet, function, operable program, or     script file. Verify the term and
 try again.
At line:1 char:14
+ import-module  <<<< failoverclusters

This was with a fresh install of Windows Server 2008 Enterprise. I installed Powershell as a Windows feature through the Server Manager. It was not installed already when I installed Windows Server.

like image 923
smcg Avatar asked Feb 18 '23 16:02

smcg


1 Answers

That's because Windows 2008 only comes with PowerShell 1.0 which used Snapins. If you need module support: install PowerShell 2.0 or 3.0. Links til installers:

Powershell 2.0: x64 (64-bit) or x86 (32-bit)

PowerShell 3.0

To install PS 3.0 you need at least 2008 SP2(and download the windows 6.0 64 or 32 bit version).

like image 168
Frode F. Avatar answered Feb 27 '23 05:02

Frode F.