PnP stands for Practices and Patterns and is a community driven open source project, where Microsoft and community members have created an implementation pattern for Office 365 and SharePoint On-Premises. One of the branches of the PnP development is in PnP Core CSOM Library.

PnP Core library provides CSOM extension methods for SharePoint 2016 add-in model development. Official documentation can be accessed here. PnP Core library increases the productivity of the developers by abstracting the complex operations. In this article, we will see, how to set up PnP core library on a remote basis and work with SharePoint 2016, using a Console Application.

In order to work with PnP Core library, we first have to install the NuGet package manager which is explained in this article

Once PnP Core Library is added, we can kick of the implementation, using a Console Application.

Project structure

Create a Console Application and add the references, given below-

Scope of the article will be to perform the operations, given below, using PnP Core CSOM Library,

Activate the feature.

Deactivate the Feature

Summary

You can copy and paste the ‘Full Code’ fragment into the Main() of the Console Application of the project structure, given at the starting of the article to test it at your end. Thus, we have seen, how to activate and deactivate the Web features in SharePoint 2016 operations on a remote basis, using PnP Core library. In this method, you don’t have to get into the Server, where SharePoint 2016 is installed and enables us to work on a remote basis.