Wednesday, October 30, 2013

SDDL String Contains an invalid SID or a SID that cannot be translated” ERROR During SHAREPOINT 2013 configuration wizard

Error : SDDL String Contains an invalid SID or a SID that cannot be translated” ERROR During SHAREPOINT 2013 configuration wizard 8th Step

Solution :

Browse to
1.  "C:\Program Files\Microsoft Office Servers\15.0\Data\Office Server" folder
2. Right click on Analytics_cf2da844-a5ee-4a2a-898d-e800a936e434 (Analytics_GUID) folder
3.Share the folder as shown below

4. Click ok & Apply 5. Now Run configuration wizard again.

Saturday, August 24, 2013

Power Shell script to delete SharePoint Property bag Values.

# Add Powershell Snapin

Add-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue

# Set the variable to removed from property bag

$RemovePropertyBag = "DBConString"

# Get the central admin URL to delete the Property bag value at farm level

$SiteUrl = Get-SPWebApplication -includecentraladministration | where { $_.DisplayName -eq "Sharepoint Central Administration v4" }

# Load Required Assemblies

[System.Reflection.Assembly]::Load("Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c")

[System.Reflection.Assembly]::Load("Microsoft.Practices.ServiceLocation, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35")

[System.Reflection.Assembly]::Load("Microsoft.Practices.SharePoint.Common, Version=, Culture=neutral, PublicKeyToken=ef4330804b3c4129")

 $site = New-Object Microsoft.SharePoint.SPSite($SiteUrl.URL)

# Get Service locator context and config Manager to set the site context

$serviceLocator = [Microsoft.Practices.SharePoint.Common.ServiceLocation.SharePointServiceLocator]::GetCurrent()

$configManager = $serviceLocator.GetInstance([Microsoft.Practices.SharePoint.Common.Configuration.IConfigManager])


 # Get Property Bag

$farmBag = $configManager.GetPropertyBag([Microsoft.Practices.SharePoint.Common.Configuration.ConfigLevel]::CurrentSPFarm)

# set the Value

$configManager.SetInPropertyBag($RemovePropertyBag, "", $farmBag)

write-host "Removing PropertyBag Values $RemovePropertyBag successful"

PowerShell Script to backup WSP from Central Admin's solution gallery

For a specific solution backup

$solution = Get-SPSolution $packageName -ErrorAction SilentlyContinue
# Get the File name from Solution file.
$filename = $solution.SolutionFile.Name

# script to get the location where the script is running -- folder location.
$BaseFolder = (Get-Location -PSProvider FileSystem).ProviderPath

# Save the file to Disk

To backup all the solutions from central admin' solution gallery

$BaseFolder = (Get-Location -PSProvider FileSystem).ProviderPath
$SPSolutions = get-spsolution
foreach($solution in $spsolutions)
$filename = $solution.SolutionFile.Name

Tuesday, August 13, 2013

Power Shell Script to Hide NewsFeed, Sites, Sky Drive top menu bar in SharePoint 2013

In order to hide the menu bar , We have to make below node text to empty by using PowerShell

i,e. Div tag shoud look like
$WebApp =  get-spwebapplication("Any Specific WebApp URL")
$WebApp.SuiteBarBrandingElementHtml = ""

This can be achieved using Java Script on Master Page or by editing the same in SharePoint designer.

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'"
            Start-Sleep -s 5
            Start-Sleep -s 5

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")

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.