Enable SharePoint 2013 Server Publishing Feature using PowerShell

In this post, we will discuss how we can enable the SharePoint 2013 server publishing feature using PowerShell. If within a Site collection if you have multiple subsites, then PowerShell will be very much helpful in activating the Publishing feature in all subsites, we do not need to go to each site and activate from the browser.

You may also read:
Show flash message and notification in SharePoint page in SharePoint 2013

Below is the PowerShell command to activate publishing feature in all sites and subsites within a site collection.

Site Collection Level:

$site = Get-SPSite https://SiteCollection URL/
$site | Get-SPWeb -limit all | ForEach-Object {Enable-SPFeature -Identity “PublishingWeb” -Url $_.Url}

Below is the PowerShell command if you want to activate publising feature for a particular site.
Individual Site:

Enable-SPFeature -Identity PublishingWeb -URL https://SiteURL/ -Force

Hope this will be helpful.

Check out Best Alternative to InfoPath -> Try Now

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

View all posts by Bijay Kumar →