PNP Power Shell for SharePoint Online Install and Uninstall, Resolve Installation Issues

Loading

Requirement : How to connect with SharePoint and then Install pnP Module in the System and if we have any issues Resolving those and if we want to Uninstall, How to Uninstall this pnP Module.

Use Windows Power Shell ISE, will have a window to write the script and all the commadlets

we can able to execute.

Open Windows Power Shell ISE, When we are working for an organization we won’t have the Administrative right to overcome this issue we can use -Scope currentuser, Install pnP Power Shell Module Write the commandlet mentioned below.

Install-Module PNP.PowerShell -Scope currentuser

Click on Run, Then will get a popup i.e., Your Installing the module from Unstrusted resposity like this it is asking for the conformation click on Yes to All, It will download this pnP Power Shell and it will install in the system after completing the Installation of pnP Power Shell Module and will see what version it is installed.

Next commandlet to connect to a SharePoint Site. Open a New File and write a commandlet to connect, We can use the intellisense which is connect PNP Online. We have to pass the URL and use weblogin this will open to login window from the web and we can get MFA as well and we can approve from the device and another option is Interactive

We can write this interactive and then we can able to enter the User ID, Passwords.

We can use this Interactive we no need to pass for each and every site. But if we use weblogin we need to pas the credentials each and every time. Write the below motioned Script in Console panel.

connect-pnPOnline  -Url Use Your SharePoint Url Here -weblogin or Interactive

Click Run Button. Will get an error, The connect-pnPOnline command was found in the Module pnP.PowerShell, But the Module can not be loaded.

For more information, Write the below mentioned script in Script panel.

Ps c:/User/Bades> Impact-Module pnP.PowerShell

Run this One, It could not load the file or assembly Syatem.Management Automation, Version is 7.2.0.0.

Problem with the Version. Write the below mentioned code.

Get-Module pnP.PowerShell -ListAvailable

Click on Enter their is a version 2.2.0 their might be an issue with this version. To resolve this one

We have to Uninstall this module logged in as a User, We can not able to do that. Logged in as a Administrator-Windows PowerShell ISE

Open the PowerShell Window. Use below motioned code

Uninstall-Module pnP.PowerShell -Allversions

Click on Run Button. It will uninstall the Allversions, Close the PowerShell Window.

Install this Module we have a commandlet mentioned below

Install-Module PNP.PowerShell -RequiredVersion 1.12.0 -AllowClobber -Force -Scope CurrentUser

It will install the version 1.12.0 in the system.

Leave a Reply

Your email address will not be published. Required fields are marked *