Getting error while Import SharePoint online module

%3CLINGO-SUB%20id%3D%22lingo-sub-2263289%22%20slang%3D%22en-US%22%3EGetting%20error%20while%20Import%20SharePoint%20online%20module%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2263289%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20Import%20module%20but%20getting%20below.%20Can%20please%20help%20me%20how%20to%20resolve%20this%20error.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3ECommand%3A%3C%2FSTRONG%3E%26nbsp%3BImport-Module%20SharePointPnPPowerShellOnline%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EError%3A%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EImport-Module%20%3A%20Could%20not%20load%20type%20'OfficeDevPnP.Core.Pages.DefaultClientSideWebParts'%20from%20assembly%20'OfficeDevPnP.Core%2C%20Version%3D3.28.2012.0%2C%20Culture%3Dneutral%2C%3CBR%20%2F%3EPublicKeyToken%3D5e633289e95c321a'.%3CBR%20%2F%3EAt%20line%3A1%20char%3A1%3CBR%20%2F%3E%2B%20Import-Module%20C%3A%5Cfoldertosavemoduleto%5CSharePointPnPPowerShellOnline%5C3%20...%3CBR%20%2F%3E%2B%20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%3CBR%20%2F%3E%2B%20CategoryInfo%20%3A%20NotSpecified%3A%20(%3A)%20%5BImport-Module%5D%2C%20TypeLoadException%3CBR%20%2F%3E%2B%20FullyQualifiedErrorId%20%3A%20System.TypeLoadException%2CMicrosoft.PowerShell.Commands.ImportModuleCommand%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3EHarish%20Patil%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2263289%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Contributor

Hi All,

 

I am trying to Import module but getting below. Can please help me how to resolve this error.

 

Command: Import-Module SharePointPnPPowerShellOnline

 

Error:

Import-Module : Could not load type 'OfficeDevPnP.Core.Pages.DefaultClientSideWebParts' from assembly 'OfficeDevPnP.Core, Version=3.28.2012.0, Culture=neutral,
PublicKeyToken=5e633289e95c321a'.
At line:1 char:1
+ Import-Module C:\foldertosavemoduleto\SharePointPnPPowerShellOnline\3 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Import-Module], TypeLoadException
+ FullyQualifiedErrorId : System.TypeLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand

 

Thanks,

Harish Patil

1 Reply

The Sharepoint PNP has been deprecated. Go to PnP PowerShell Overview | Microsoft Docs and install the PNP module. @harishpatil