Monday, June 23, 2014

Remove Theme in SharePoint 2013 using PowerShell

Requirement: To enforce consistency, We wanted to reset custom themes applied on SharePoint sites by end users in our SharePoint environment.

Solution: Remove theme programmatically using PowerShell!

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Variable
$WebAppURL = "http://intranet.crescent.com"

Get-SPWebApplication $WebAppURL | Get-SPSite -Limit ALL | Get-SPWeb | ForEach-Object {
#remove theme sharepoint 2013
$Theme = [Microsoft.SharePoint.Utilities.ThmxTheme]::RemoveThemeFromWeb($Web,$false)
$Web.Update()
}
Write-host "Themes are removed from all sites!" 
This removes and reset to default SharePoint theme. Same script works for SharePoint 2010 also to remove theme.



You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Check out these SharePoint products:

No comments :

Post a Comment

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...