In this PowerShell SharePoint tutorial, we will discuss how to resolve an error Connect-PnPOnline : The ‘Connect-PnPOnline’ command was found in the module ‘SharePointPnPPowerShellOnline’, ut the module could not be loaded. For more information, run Import-Module SharePointPnPPowerShellOnline.
The error comes when I run the below command to connect to the SharePoint Online site using PnP PowerShell cmdlets.
Connect-PnPOnline –Url https://onlysharepoint2013.sharepoint.com/sites/SharePointSky –Credentials (Get-Credential)
This is how the error looks like below:
Connect-PnPOnline : The ‘Connect-PnPOnline’ command was found in the module ‘SharePointPnPPowerShellOnline’
The error usually comes if there is a conflict with the PnP SharePoint version that installed in the machine.
I installed Install-Module SharePointPnPPowerShellOnline in the same machine where I have SharePoint 2016 is installed.
I tried to reinstall Install-Module SharePointPnPPowerShellOnline and then when I run the command the issue got resolved.
You may like following SharePoint PowerShell tutorials:
- 15 PowerShell Basic Commands Examples
- Working with PowerShell Date Command (Get-Date)
- PowerShell Basics: A Beginners Guide
- SharePoint Online Automation: Upload Files Remotely to SharePoint Online Document Library using PowerShell
- What is PowerShell variables
- SharePoint 2016 PowerShell Script to list all Users in Site Collection
- SharePoint 2013 backup and restore using PowerShell
- SharePoint Online storage limits
- Install-Module : The term ‘Install-Module’ is not recognized as the name of a cmdlet, function, script file, or operable program
- Get SharePoint document library size using PowerShell
Hope this SharePoint tutorial helps to resolve error Connect-PnPOnline The Connect-PnPOnline command was found in the module SharePointPnPPowerShellOnline.
Hello Everyone!! I am Bhawana a SharePoint MVP and having about 10+ years of SharePoint experience as well as in .Net technologies. I have worked in all the versions of SharePoint from wss to Office 365. I have good exposure in Customization and Migration using Nintex, Metalogix tools. Now exploring more in SharePoint 2016 🙂 Hope here I can contribute and share my knowledge to the fullest. As I believe “There is no wealth like knowledge and no poverty like ignorance”