Posts

Microsoft.SharePoint.Administration.SPUpdatedConcurrencyException", SharePoint exception after applying cumulative update\service pack

After applying a cumulative update on one of my SharePoint server, tried to run configuration file using psconfig.exe -cmd upgrade -inplace b2b -wait -force command, i got an error saying that "Exception: Microsoft.SharePoint.Administration.SPUpdatedConcurrencyException: An upgrade conflict has occurred and you must re-try this action" We can fix this exception by setting line-update-running property to true. To do that Open command prompt with administrator privileges and navigate to bin folder (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Bin) and execute following command stsadm -o setproperty -pn command-line-upgrade-running -pv Yes By running this command on SharePoint server, it will reset the command-line-upgrade-running property. We need to execute this command on all the SharePoint servers in the farm after upgrading. Once we are done with running this command, we have to run config command as psconfig.exe -cmd upgrade -inplace b2b –wai...

Get list of all users in a site collection and get all the web parts in a page

We can get the list of all users and web parts in a page by entering the URL of the site with addition of text. We can get all the users by appending “_ layouts/people.aspx?membershipGroupId=0 ” text. We can get all the users in a Site collection. We can have settings for the list of the users. We can get the list of all web parts in a page by appending “ ?contents=1 ” text to Url of the site. It will navigate to SharePoint web parts maintenance page. We can have option to close the web parts, reset and delete the web parts from the page

Change SharePoint Site Time Format

Image
In SharePoint calendar by default we can see the view as Day/week in 12 hour format, not in 24 hour format. We can to change the format from 12 hour to 24 hour through UI or using Power Shell commands. We can change that through UI by following steps, Navigate to SharePoint Site settings page and in Site Administration section click on “Regional settings” link In Time format drop down select 24 hour format. Click on ok to save the settings. We can change the format using following Powershell commands, $site = Get-SPSite <SiteCollectionURL> $web = $site.OpenWeb() $web.RegionalSettings.Time24=$True $web.RegionalSettings.FirstDayOfWeek=1 $web.Update() $web.Dispose() $site.Dispose()

SharePoint 2010 Unable to delete a content type

Image
Error: Content Type Still in Use Description When attempting to delete a content type from the site collection, Content Type Gallery, an error is returned: Error The content type is in use. Troubleshoot with Microsoft SharePoint Foundation. Correlation ID:  50b2222f-ee94-406eb7bb-d12a0be59dcd Solution There must be a document library, some place within the site collection using the Content Type that you are trying to delete.  For this reason it is not possible to delete the Content Type.  To fix this issue, identify the document library that is currently using the Content Type.  Change the Content Type of any documents in the library currently set to the Content Type.  Delete or remove the Content Type from the document library. Once you've done this, it will be possible to delete the Content Type from the gallery.

Configuring outgoing email in SharePoint 2010 Central Administration

Image
Launch Central Administration and navigate to System Settings / E-Mail and Test Messages / Configure outgoing e-mail settings. Enter your Outbound SMTP server, i.e. your Exchange server and specify a From and Reply-to address. Click OK Testing our configuration Lets navigate to our SharePoint 2010 web application and create an Alert .  In my example I will create an immediate alert for Announcements. Navigate to your Announcement List and click on List Tools/List and then click on “Alert Me” located in the ribbon interface. Select “Set alert on this list” and select your Alert options.  Ensure that you have “send notifications immediately” selected for testing purposes. Click OK You should receive your notification email that you have successfully subscribed soon after creating your alert.

How to Print Grid View in SharePoint

step 1:  Create  html button <input type="button" value="Print " id="bbtnPrint" runat="Server" onclick="javascript:CallPrint('name')"  visible="false"/> Step 2: in the div tag use  grid-view <div id=”name”>     <table>     </table> </div> step 3:Function Call <script type="text/javascript"> function CallPrint(strid)      {          var prtContent = document.getElementById(strid);          var WinPrint = window.open('', '', 'letf=0,top=0,width=600,height=500,toolbar=0,scrollbars=0,status=0');          WinPrint.document.write(prtContent.innerHTML);          WinPrint.document.close();          WinPrint.focus();          WinPrint.print();          WinPrint.close();      } </script>

Activating a SharePoint Feature on Multiple Sites or Site Collections using PowerShell

I need to either activate or even deactivate certain features on multiple site collections. So the below script will allow you to do this.. First step create a text file in the below format, you only need to define the URL for each Site collection or site. SiteURL http://sharepointsuresh/sites/site1 http://sharepointsuresh/sites/site2 http://sharepointsuresh/sites/site3 http://sharepointsuresh/sites/site4 http://sharepointsuresh/sites/site5 http://sharepointsuresh/sites/site6 You can list all features installed on your sites by using the following PowerShell: Get-SPFeature | Sort -Property Scope,DisplayName | FT -GroupBy Scope DisplayName,Id Then use the below PowerShell Script: $SiteList = Import-Csv Sites.txt ForEach ($item in $SiteList) {             If ($item -ne $null)             {                 Write-Host "Activated Branding Feature for: $($item.SiteURL)" -...