Tuesday, May 16, 2017

SharePoint 2013 : How to Change Site Logo Programmatically using PowerShell?

Changing the logo is a basic  when it comes to branding SharePoint 2013 sites.

If you have more site collection in SharePoint ,hundred of site collection with subsites , go with sharepoint Powershell script

Get-SPWebApplication "http://sharepoint.crescent.com" | Get-SPSite -Limit "All" | Get-SPWeb -Limit "All" |  foreach { $_.SiteLogoUrl=""; $_.update(); Write-host "Changing Logo for:"$_.Url;  }

How to change a logo across all sites/sub-sites and pages?

Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue 

$SiteURL = "http://Your-Site-Collection-URL" 
#Get the site collection
$Site = Get-SPSite $SiteURL #Iterate through each site in the site collection
 foreach($web in $Site.AllWebs)
 {
 #sharepoint change logo programmatically 
$web.SiteLogoUrl = "/relative-path-logo-file" 
$web.Update() 
}

This operation can be performed only on a computer that is joined to a server farm

 You need to update the web.config to show errors rather than giving the generic errors.  I typically use “RemoteOnly” I believe…
By the sounds of it, the user you used to install SharePoint doesn’t have the correct permissions on the database.
You should have a “farm” account and an “install” account.  
I typically have an “sp_admin” account which I use for general administration and installation.  Your farm account also has particular permissions.

Thursday, April 6, 2017

Listitem.Update vs ListItem.SystemUpdate


  • SPListItem.Update() is used to update all the values in SharePoint List Item including Modified Date, Modified By, Version fields

  • SPListItem.SystemUpdate() is used to update the values of the list item without modifying the Modified Date, Modified By and Version fields.

  • SPListItem.Update() . Event Receiver is fired in case if listitemupdated,listitemupdating  event is associated. 
  • SPListItem.SystemUpdate() Event Receiver won't be fired in case if list item updated, listitemupdating  event is associated

Wednesday, April 5, 2017

Fixed: Search Results not showing Document Titles

In this case  because the managed property ‘Title’ is mapped to crawled property ‘MetadataExtractorTitle’ by default at first priority .I have recreated the below issue my machine and I have provide the solution given below.


Go to Central Administration >Application Management> Manage service application and tried to modify the order of this crawled property and move it down.
Search Schema and search for managed property ‘Title.’ Now, inside the mappings of the managed property, you should be able to see the below attachment



Move the mapped crawled property ‘MetadataExtractorTitle’ down to the last position and save the managed property




Then reset the index,perform a full crawl against the content sources and refresh any cache associated with Site Collection.
Once the full crawl is complete, you should see the correct titles for documents in search results, as follows:



Hope It will works fine.