SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a powershell command to determine the name of the theme is used by webs under a site collection? If yes, is there a powershell way to dissassociate the theme from a web or all the webs under a given site collection?

share|improve this question
Can you explain what you're trying to accomplish? I ask because you can't disassociate a can apply a new one. This can be done thru the UI or via the OM. The UI has the added benefit of cascading the change down to any subsites that are inheriting from their parent site. – Rob D'Oria Jul 26 '11 at 18:09
up vote 1 down vote accepted

You can attach the object model via Powershell. There are no native cmdlets.

$site = Get-SPsite "url"
$web = $site.OpenWeb()
$theme = [Microsoft.SharePoint.Utilities.ThmxTheme]::GetManagedThemes($site)

You can then loop thru the collection to see all the themes assigned.

You can call various methods to manage your themes in this way.

These are disposable object so you need to manage them or use the Start / Stop-SPAssigment

Vijai has posted some other examples for working with themes:

share|improve this answer
$site=Get-SPSite ""; $web=$site.OpenWeb() [Microsoft.SharePoint.Utilities.ThmxTheme]::RemoveThemeFromWeb($web,$false) $web.Update() $web.Dispose() I went to sp manager and the old theme is still in there. hmm $site.Dispose() – Robert Half Jul 26 '11 at 19:19

Gary Lapointe's STSADM extensions might be useful here, albeit for 2007. It looks like there's a 2010 command available here.

Here is a reference on how to set it automatically with code, it could probably be tweaked to reset it to Default.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.