PowerShell – Resolving Issue – PnP.PowerShell module not getting installed / updated – small learning

Hi All,
Greetings for the day!!!
Today, one more issue and solution.
Background
- I need to create new client application (appid / clientid) in Microsoft Entra.
- I am executing PowerShell CMDLET –
Register-PnPEntraIDAppForInteractiveLogin
Register-PnPEntraIDAppForInteractiveLogin -ApplicationName "LIFE IS BEAUTIFUL" -SharePointDelegatePermissions "AllSites.FullControl" -Tenant knowledgejunction1.onmicrosoft.com -Interactive
- Since I was trying this CMDLET on my local computer, I need to install the PnP PowerShell module.
- To just make sure, no PnP PowerShell module is installed, I am executing CMDLET – Get-Module.
- but I am not getting any result.
Get-Module PnP.PowerShell

- Get-Module CMDLET not returning any result.
- Next, I am executing Install-Module CMDLET to install the PnP PowerShell module
Install-Module PnP.PowerShell
- But nothing was happening.
- Install-Module CMDLET also not returning any result as shown in image below.

- I was wondering why PnP.PowerShell module is not getting installed.
- There is no warning, no error.
- So finally started googling and in one of the article found that try to import module explicitly using CMDLET – Import-Module
- Executed the CMDLET – Import-Module
Import-Module PnP.PowerShell

- We got an error while importing PnP.PowerShell module as shown in image above.
- From error, it seems that we have old version Windows PowerShell.
- To use PnP.PowerShell we require minimum version 7.2 of Windows PowerShell.
- We have upgraded to Windows PowerShell 7.2 and PnP.PowerShell started working like charm 🙂
REFERENCES
- PowerShell – Exploring Module CMDLETs – https://knowledge-junction.in/2022/12/12/__trashed-2/
Thanks for reading !
HAPPY LEARNING AHEAD 🙂 LIFE IS BEAUTIFUL 🙂

You must be logged in to post a comment.