Working With SharePoint Web Scope Features Using CSOM PowerShell

Updated: Mar 29, 2019

In this article, you will learn how retrieve, enable or disable the site level features (web scope) programmatically using CSOM with PowerShell on SharePoint 2013 / SharePoint 2016 / SharePoint online. This article applies to features present on web scope or sub sites level.

Steps Involved:

The following prerequisites need to be executed before going for any operations using CSOM PowerShell on SharePoint sites.

  • Add the references using the Add-Type command with necessary reference paths. The necessary references are Microsoft.SharePoint.Client.dll, Microsoft.SharePoint.Client.Runtime.dll.

Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"

Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"


  • Initialize client context object with the site URL.

$siteURL = ""

$ctx = New-Object Microsoft.SharePoint.Client.ClientContext($siteURL)