Applying Theme in SharePoint 2010

To apply a theme to SharePoint site in SharePoint 2010 environment ,we can use the following Power Shell commands.  
 
    $Site = “http://mysite/sites”
    $Web = Get-SPWeb -Site $Site
    $theme = [Microsoft.SharePoint.Utilities.ThmxTheme]::Open($site,"_catalogs/theme/mytheme.thmx")
    $theme.ApplyTo($web,$false)
    $web.Update()
    $web.Dispose()
    $site.Dispose()

   *mytheme is a customized theme that we are applying.