You are currently offline, waiting for your internet to reconnect

How to re-enable the PremiumSite Feature in SQL Server 2008 R2

This article describes the steps to re-enable the PremiumSite feature after you uninstall the PowerPivot for SharePoint component in Microsoft SQL Server 2008 R2.
After you uninstall the PowerPivot for SharePoint component, Excel Services and other services in the PremiumSite feature are disabled. To re-enable the features for all the SharePoint sites in a SharePoint farm, follow these steps:
  1. Save the following code in a file that you name Post–KJUninstall.ps1:
    Param($UninstallLogFilePath)$file = $UninstallLogFilePathAdd-PSSnapin Microsoft.SharePoint.PowerShell$powerPivotFeatures = @("1a33a234-b4a4-4fc6-96c2-8bdb56388bd5", "e9c4784b-d453-46f5-8559-3c891d7159dd", "f8c51e81-0b46-4535-a3d5-244f63e1cab9")$premiumSiteId = "8581a8a7-cf16-4770-ac54-260265ddb0b2"#Remove PowerPivot features.foreach($featureId in $powerPivotFeatures){	if(Get-SPFeature | where {$_.Id -eq $featureId})	{		Write-Host "Found feature $featureId"		Uninstall-SPFeature -Id $featureId -force	}}# Verify that the premium site feature was indeed removed.$premiumSiteFeature = Get-SPFeature | where {$_.Id -eq $premiumSiteId}if($premiumSiteFeature -eq $null){	# Reinstall the feature	Install-SPFeature -path PremiumSite}switch -regex -file $file{	"de-activating feature"	{					# This will return every entry in the file for feature deactivation					$Url = $_.Split() | ?{$_ -match "http://([a-zA-Z0-9_\-]+)([\.][[a-zA-Z0-9_\-]+)*(\:[0-9]+)*(/\S*)?"}					#Remove the period at the end					$Url = $Url.Substring(0, $Url.Length - 1)					# Match the Guid for the feature.					$Id = $_.Split() | ?{$_ -match "([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}"}					if(!($powerPivotFeatures -contains $Id))					{						Write-Host "Reactivating feature $Id on site $Url"					    Enable-SPFeature -Id $Id -Url $Url						trap 							{								Write-Host "Could not Re-activate feature $Id on site $Url"								Write-Host $("Exception: "+ $_.Exception.Message);								continue							}					}					continue				}}
  2. GO to the following location: 
    %ProgramFiles%\Microsoft Sql Server\100\Setup Bootstrap\Log\
  3. Find the subfolder that has a date that corresponds to the date when you performed the uninstallation procedure. If no other SQL component is installed or if you have not run a SQL Server reparation, this directory should be the directory with the newest date. 

    Note The format of the directory name is as follows: 
  4. Copy the Detail.txt file to a known directory. For example, copy the file to C:\LogFiles.
  5. Copy the Post–KJUninstall.ps1 file to the same directory where you copied the Detail.txt file. 
  6. Start the SharePoint 2010 Management shell by using a Farm administrator account.
  7. Run the following command from the shell: 
    <Known directory>\Post-KJUninstall.ps1 –UninstallLogFilePath <Known directory>\Detail.txt
  • <Known directory> represents the directory in which the Detail.txt file and the Post–KJUninstall.ps1 file are stored. For example, this placeholder may represent C:\LogFiles.
  • All these steps must be run by an administrator.
  • After you follow these steps, you can re-enable the PremiumSite feature. 

Article ID: 2261512 - Last Review: 08/26/2011 18:42:00 - Revision: 2.1

  • kbsurveynew kbexpertiseadvanced kbprb KB2261512