Link to home
Start Free TrialLog in
Avatar of Eprs_Admin
Eprs_AdminFlag for Austria

asked on

powershell install module

Hi Experts,

I cannot install a module to powershell.
I like to install this module:

PS C:\> Install-Module AzureAD
Install-Module : The term 'Install-Module' 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 again.
At line:1 char:1
+ Install-Module AzureAD
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Install-Module:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Open in new window


This command is part of a script and was always working.

What I am doing wrong ?
EXPERT CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Eprs_Admin

ASKER

Hi, this is my ADConnect-Server WIN-Server 2012 R2

Name                           Value
----                           -----
PSVersion                      4.0
WSManStackVersion              3.0
SerializationVersion           1.1.0.1
CLRVersion                     4.0.30319.36575
BuildVersion                   6.3.9600.19170
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion      2.2

Open in new window

EXPERT CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of oBdA
oBdA

Well then, find a quiet minute for this server and update PowerShell from the link I posted above; Install-Module is only available with 5.x.
You could probably install the module manually, but there's no real point in working with a rather old PS version.
ok, do I need a reboot ?
Can't tell in advance, sorry. Might need it, might not; differs on what needs to be updated on that certain machine.
On a side note: for that full Windows 10 / Server 2016 feeling of the advanced command line, you can install the PSReadLine module as well:
Find-Module PSReadLine | Install-Module

Open in new window

Hi OBDA,

when I type FIND-MODULE in my powershell of Windows 2012R2, I cannot find this commandlet.
Just this file is enough ?
Win8.1AndW2K12R2-KB3191564-x64.msu
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial