Sandeep Khandelwal's Blog

SharePoint, ASP.net & other related stuffs

Cumulative update issue - The upgrade command is invalid or a failure has been encountered.

clock December 8, 2011 09:49 by author Sandeep Khandelwal

Recently when trying to update the server with June CU, ran into a weird scenario. After June CU was installed and all the servers rebooted, when trying to run the psconfig on WFEs or App Servers, we saw the following error. And there is no work-around on this.

C:\Windows\system32>"C:\Program Files\Common Files\Microsoft Shared\Web Server E
xtensions\14\bin\psconfig" -cmd upgrade -inplace b2b -wait
SharePoint Products Configuration Wizard version 14.0.6009.1000. Copyright (C) M
icrosoft Corporation 2010. All rights reserved.

The upgrade command is invalid or a failure has been encountered.
The server farm will not work with missing installs. Add "-cmd installcheck -noi
nstallcheck" to the command-line to ignore this warning.

The following is missing on SETOPSPAPP01Q:
Hotfix for Microsoft SharePoint Foundation 2010 (KB2536601)
Hotfix for Microsoft SharePoint Foundation 2010 (KB2536601)
Hotfix for Microsoft Office Server (KB2536599)
Hotfix for Microsoft Office Server (KB2536599)
Hotfix for Microsoft Office Server (KB2536599)
Hotfix for Microsoft Office Server (KB2536599)
Hotfix for Microsoft Office Server (KB2536599)
Hotfix for Microsoft Office Server (KB2536599)
Hotfix for Microsoft Office Server (KB2536599)
Hotfix for Microsoft Office Server (KB2536599)
Hotfix for Microsoft Office Server (KB2536599)
Hotfix for Microsoft Office Server (KB2536599)
Hotfix for Microsoft Office Server (KB2536599)
Hotfix for Microsoft Office Server (KB2536599)
Hotfix for Microsoft Office Server (KB2536599)
Hotfix for Microsoft Office Server (KB2536599)
Hotfix for Microsoft Office Server (KB2536599)
Hotfix for Microsoft Office Server (KB2536599)
Hotfix for Microsoft Office Server (KB2536599)
Hotfix for Microsoft Office Server (KB2536599)
Hotfix for Microsoft Office Server (KB2536599)
Hotfix for Microsoft Office Server (KB2536599)
Hotfix for Microsoft Office Server (KB2536599)
Hotfix for Microsoft Office Server (KB2536599)
Hotfix for Microsoft Office Server (KB2536599)
Hotfix for Microsoft Office Server (KB2536599)
Hotfix for Microsoft Office Server (KB2536599)
Hotfix for Microsoft Office Server (KB2536599)

Now, the error clearly indicates that CU update didn’t run quite well. So, now we looked at installed updates on the server and sure enough, we see a tons of hotfixes pertaining to KB2536599 installed. It almost as if the server has all the required patches but doesn’t recognize them. So, here is the little powershell command that can help.

Open your favorite powershell editor and execute the following command.

Get-SPProduct –local

And Yes now the weird error gone and we successfully ran the psconfig commands.

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


SSRS SharePoint integrated mode issue

clock September 27, 2011 09:00 by author Sandeep Khandelwal

Recently I was configuring SSRS to run in Integrated mode with SharePoint 2010. All the pieces seems to be installed correctly and when trying to configure Reporting Services Integration under Central Admin –> General Settings –> Reporting Services Integration but kept getting the following error.

System.Web.Services.Protocols.SoapException: The permissions granted to user 'Domain\User"’ are insufficient for performing this operation. ---> Microsoft.ReportingServices.Diagnostics.Utilities.AccessDeniedException: The permissions granted to user 'Domain\User' are insufficient for performing this operation. at Microsoft.ReportingServices.WebServer.ReportingService2010Impl.GetReportServerConfigInfo(Boolean scaleOut, String& ServerConfigInfo) at Microsoft.ReportingServices.WebServer.ReportingService2010.GetReportServerConfigInfo(Boolean ScaleOut, String& ServerConfigInfo)   

Not sure why this was happening; Confirmed that “Domain\User” has dbo permissions on reportserverDB and tempDBs. Confirmed that Central Administration pool account also has permission to the reporting services. After few hours of brain churning, I decided to add the “Domain\User” as local administrator and voila. Everything started working. But I still wasn’t convinced why I had to do that. So, I started my expedition via bing. And voila, I found the Microsoft article that references this.

http://msdn.microsoft.com/en-us/library/bb326213.aspx

Refer to line # 6.

So, just to sum up, the resolution is to add the user account (service account) running the reporting service as Local Administrator on the box where reporting services is installed and configured. This could be a dedicated machine in the farm or installed on one of the application server.

Currently rated 3.0 by 15 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


How to remove a tab from all the sites in a web application

clock August 30, 2011 12:25 by author Sandeep Khandelwal

Recently, I had a need to basically remove “Home” tab from global navigation for all the sites (Site collections) in a web application. Here is a quick code snippet that basically does that.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint.Publishing;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;
using Microsoft.SharePoint.Navigation;
namespace GlobalNavigationRemove
{
    class Program
    {
        static void Main(string[] args)
        {
            string webAppUrl = string.Empty;
            int iCounter = 0;
            int iNbrOfSites = 0;
            if (args.Length > 0)
            {
                Console.WriteLine(string.Format("Web Application: {0}", args[0]));
                webAppUrl = args[0].ToString();
                if (args.Length > 1)
                {
                    Console.WriteLine(string.Format("Test Iteration: {0}", args[1]));
                    iNbrOfSites = int.Parse(args[1].ToString());
                }
            }
            SPWebApplication webApp = SPWebApplication.Lookup(new Uri(webAppUrl));
            Console.WriteLine(string.Format("Total Site collections detected: {0}" , webApp.Sites.Count.ToString()));
            Console.WriteLine(string.Format("*************************************Starting the removal ********************************"));
               
                foreach (SPSite siteCollection in webApp.Sites)
                {
                    if (iCounter > iNbrOfSites && iNbrOfSites != 0)
                    {
                        return;
                    }                   
                    PublishingWeb myPublishingWeb = PublishingWeb.GetPublishingWeb(siteCollection.OpenWeb());
                    Console.WriteLine(string.Format("Now Processing : {0}", myPublishingWeb.Title));
                    SPNavigationNodeCollection publishingNavigationNodes = myPublishingWeb.Navigation.GlobalNavigationNodes;
                    try
                    {
                        SPWeb web = siteCollection.OpenWeb();
                        SPNavigationNodeCollection webNavigationNodes = web.Navigation.TopNavigationBar;
                       

                        foreach (SPNavigationNode node in webNavigationNodes)
                        {
                            if (node.Title.Trim().ToLower() == "home")
                            {
                                node.Delete();
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(string.Format("Exception Occurred while processing site {0} \n\n", ex.ToString()));
                    }
                    iCounter++;

            }
        }
    }
}

Currently rated 3.3 by 6 people

  • Currently 3.333333/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


OffWfCommon feature not installed

clock August 30, 2011 10:40 by author Sandeep Khandelwal

Recently, I was trying to create a new site collection of type “Publishing” but I get kept the following errors.

Dependency feature with id c9c9515d-e4e2-4001-9050-74f980f93160 for feature 'ExpirationWorkflow' (id: c85e5759-f323-4efb-b548-443d2216efb5) is not installed.

On a quick bing search, the feature id c9c9515d-e4e2-4001-9050-74f980f93160  corresponds to “OffWFCommon” feature. So, I went to my 14 hive and did a quick lookup. To my surprise, the feature files were already in the file system. Now, instead of trying to figure out why this happened, I just wanted to move on with my project. So, I ran the following powershell command. This command basically, re-attaches the orphaned features in feature folder.

INSTALL-SPFEATURE -PAth "OffWFCommon"

 

And Voila, now, I was able to create my test publishing site just fine. Hope this helps someone else.

image

Currently rated 3.2 by 6 people

  • Currently 3.166667/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


How to activate a feature in all the site collections in a web app

clock August 24, 2011 10:13 by author Sandeep Khandelwal

Here is the code snippet that will help.

$webAppUrl = "<yourWebAppUrl>"
$webapp = Get-SPWebApplication $webAppUrl  | Get-SPSite -Limit All | Get-SPSite -limit all | ForEach-Object {Enable-SPFeature -Identity 'Your feature guid'  -Url $_.Url}

Recently, I had to create this PowerShell command to activate branding features to all the existing site collections.

Currently rated 3.0 by 5 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


About the author

I work as SharePoint Consultant and Lead ECM Solution Expert for Integration Now (a pioneer in SharePoint solutions in midwest region). Besides having PMP, MCP, MCTS and other technical certifications, I am also an MBA (Finance) from UMKC. I lead & oversee SharePoint engagements in 4 states around Kansas City (MO, KS, IA, & NE).

Tag cloud

Page List

Sign in