powershell: Import-module "PnP.PowerShell" not working
Reporting an Issue
import-module “PnP.PowerShell” not working
Expected behavior
PnP PowerShell should be loaded into actual session
Actual behavior
Not able to load PnP PowerShell into actual session. import-module “PnP.PowerShell” gives following error:
Import-Module : Die Datei oder Assembly "System.Management.Automation, Version=7.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden. In Zeile:1 Zeichen:1 Import-Module "Pnp.PowerShell" CategoryInfo : NotSpecified: (:) [Import-Module], FileNotFoundException FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand
Steps to reproduce behavior
Install-Module “PnP.PowerShell” -Scope CurrentUser Import-Module “PnP.PowerShell”
What is the version of the Cmdlet module you are running?
2.1.0 or 2.1.1, both have the issue With 1.12.0 everything works fine
Which operating system/environment are you running PnP PowerShell on?
- [ X] Windows 10
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 19 (1 by maintainers)
@AlyaKoni ISE and PS 5.x is not supported anymore - installed PS 7.3 and using VisualStudio Code as Editor worked fine.
As @SnappyFPV mentioned, you need to install PS 7.2 or later versions. This 2.1.1 release has dropped support for PS 5.1 and ISE.
If you want to keep using PS 5.1 or ISE, you can use the 1.12.0 version. Bug fixes and improvements will only be done on the 2.x releases in the future.