Monday, July 9, 2012

Start a specific service on all SharePoint Servers in a FARM (WFE and APP Servers) using PowerShell


//Services Like SPTimerV4, SPAdminV4, iisadmin, W3SVC, WAS
        $serviceName = "Name of the service to be started"
        // Loop thru all the servers in a SharePoint Farm
        foreach ($server in (get-spserver | Where {$_.Role -ne "Invalid"}) )
        {
            Write-Host Restarting $serviceName in $server.Name
            $service = Get-WmiObject -computer $server.Name Win32_Service -Filter "Name='$serviceName'"
            $service.InvokeMethod('StopService',$Null)
            Start-Sleep -s 5
            $service.InvokeMethod('StartService',$Null)
            Start-Sleep -s 5
            $service.State           
        }



Upgrading SharePoint Feature using PowerShell


$site = get-spsite "http://mysite"
$features = $site.QueryFeatures("web", $true);

foreach($feature in $features)
{
        if($feature.Definition.DisplayName -eq "FeatureName")
        {       
            $feature.Upgrade($true);
        }
}

Thursday, February 3, 2011

Could Not Connect to Sharepoint from Infopath 2010

Some times when we trying to connect to sharepoint site from infopath we will get an error saying Operation could not be completed as shown below


This means that top level site is not created.
To test this
Browse the url http://servername in my instance it could be http://win2008r2:11442 if we get page cannot be displayed message, top level site is not created without which we can't connect to sharepoint site from a infopath form.
To resolve this go to central admin and
  • click on create a site collections in application management tab
  • Provide Title and Description
  • select URL field without sites option from the URL dropdown.(in my case it could be http://win2008r2:11442/ )
  • Select a Template
  • Give primary and secondary Site collection administrators and click on OK.
dats it, u have created top level site.
Now move on to ur infopath form and try to connect to sharepoint.



Time Intelligence Functions in Power BI: A Comprehensive Guide

Time intelligence is one of the most powerful features of Power BI, enabling users to analyze data over time periods and extract meaningful ...