M365 – Powershell Script – 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.

Hi All,

Greetings for the day 🙂 LIFE IS BEAUTIFUL WITH M365 🙂

Today new issue and solution 🙂

I shared PowerShell script to execute with one of my colleague. So he started SharePoint Online Management Shell and try to execute the script.

While executing the script he got following error

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.

M365 - PowerShell script - Error -  The term 'Install-Module' is not recognized as the name of a cmdlet
Fig1: M365 – PowerShell script – Error – The term ‘Install-Module’ is not recognized as the name of a cmdlet

Solution: This means that we didn’t have installed “Windows Management Framework 5.1” on our system.

We can download ” Windows Management Framework 5.1 ” from https://www.microsoft.com/en-us/download/details.aspx?id=54616

M365 - PowerShell scripts - Installing Windows Management Framework 5.1
Fig2: M365 – PowerShell script – Installing Windows Management Framework 5.1

Once we click on “Download” button as shown in Fig2 we will get the download options as

M365 - PowerShell script -   Installing Windows Management Framework 5.1 - Option selected is also works for Windows 10 even though options are till win 8
Fig3: M365 – PowerShell script – Installing Windows Management Framework 5.1 – Option selected is also works for Windows 10 or Windows server 2012 or Windows server 2012 R2 even though options are till win 8

Once “Windows Management Framework 5.1” is installed successfully (it may ask for restart) this issue will went away. Then enjoy the PowerShell cmdlets 🙂

Thanks for reading 🙂 Enjoy the journey, Life is beautiful 🙂

References:

Advertisements

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.