[BUG] PnP PowerShell is not importing with windows PowerShell ISE however it loading with windows PowerShell 7.4- unable to debug script
Hi there,
I have installed the latest version of PnP PowerShell 2.3.0 and when I Import-Module PnP.PowerShell with windows PowerShell 7.4 , it's importing fine but when I use windows PowerShell ISE editor and importing Import-Module PnP.PowerShell is throwing following error. I want to debug the script using windows PowerShell ISE but unable to do it. I am in windows 11 a surface pro. please help
Import-Module : Could not load file or assembly 'System.Management.Automation, Version=7.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. At line:1 char:1
Import-Module PnP.PowerShell
- CategoryInfo : NotSpecified: (:) [Import-Module], FileNotFoundException
- FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand
Also followed the step but no luck..
Hi @fcbtdoorga , PnP PowerShell only works in PowerShell 7.2 or later versions now. We dropped support for PS 5 and ISE when we migrated to v2.
This is by design.