Hello All,
I am trying to run command "Connect-PnPOnline" but I am getting below error message. I tried to use Import-PnPOnline and also Install-PnPOnline, but none of them were worked properly. Request you to guide me step by step to resolve this errors.. I am new to this Powershell and unable identify the errors.
onnect-PnPOnline : The 'Connect-PnPOnline' command was found in the module 'PnP.PowerShell', but the module could not be
loaded. For more information, run 'Import-Module PnP.PowerShell'.
At line:1 char:1
+ Connect-PnPOnline -Url "https://contoso.sharepoint.com" -UseWebLogin
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Connect-PnPOnline:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CouldNotAutoloadMatchingModule
And also when I tried to "Import-Module PnP.PowerShell", I am getting below error message.
Import-Module : The specified module 'PnP.PowerShell' was not loaded because no valid module file was found in any module
directory.
At line:1 char:1
+ Import-Module PnP.PowerShell
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (PnP.PowerShell:String) [Import-Module], FileNotFoundException
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
PS C:\WINDOWS\system32> Install-Module -Name PnP.PowerShell
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.
At line:1 char:1
+ Install-Module -Name PnP.PowerShell
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Install-Module:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException