Tuesday, July 17, 2012

Find which edition (standard/enterprise) of SharePoint 2010 installed

To find this go to Central Admin and navigate to Upgrade and Migration | Click on Convert Farm License Type under Upgrade and Patch Management. You will see installed license type next to Current License ( It should say SharePoint Server with <Standard Or Enterprise> Client Access License)
You can convert the License by entering Product key printed on your Client Access License Agreement.

Or Upgrade and Patch Management | Enable Enterprise Features
Note - Once you have upgraded to Enterprise, you cannot switch back to use only the Standard features.

Watch demo of Office 2013

Microsoft Corp., the world's biggest software maker, unveiled the next version of its Office software with social and cloud features that will work with touch-screen devices powered by its Windows 8 operating system. Big news from this is "touch", "ink", "Cloud"!

Office Preview : http://www.microsoft.com/en-gb/officepreview

Watch the press conference launching office2013 to the world, led by Stever Ballmer.



Wednesday, July 11, 2012

Backup and Restore User Profile Service application using PowerShell

Recently User Profile Service application stopped working. User Profile Service was stuck on Starting state. I thought of deleting UPS application but then I realized if I delete User Profile Service application, we are going to lose social tags, notes, status updates etc., as those are part of the "Social tagging database" which is part of User Profile application. I used PowerShell to backup and restore of UPS application. This can be done using Central administration as well.

Run these commands in SharePoint 2010 Management Shell.

To back up the User Profile Service application
Backup-SPFarm -Directory <BackupFolderAtLocalComputer> -BackupMethod Full -Item “Shared Services\Shared Services Applications\<NameOfUserProfileServiceApplication>” [-Verbose]

You must also back up the service application proxy.
Backup-SPFarm -Directory < BackupFolderAtLocalComputer > -BackupMethod Full -Item 
“Shared Services\Shared Services Proxies\<NameOfUserProfileServiceApplicationProxy>” 
[-Verbose]

To restore the User Profile Service application
Restore-SPFarm -Directory <PathOfBackupFolder> -Item 
Shared Services\Shared Services Applications\<NameOfUserProfileServiceApplication> 
-RecoveryMethod Overwrite [-BackupId <GUID>] [-Verbose]

<GUID> is the identifier of the backup to use in the restore process.

Tuesday, July 3, 2012

Differences between SharePoint On-Premises and Office365 SharePoint

I was looking for Pros n Cons of SharePoint On-Premises and Office365 SharePoint. I came across with a nice comparison list. Check this link
 (http://collabranetworks.com/office365_fullpages/The%20Differences%20Between%20SharePoint%20Online%202010%20and%20SharePoint%20Server%20On%20Premises.html )

Tuesday, May 15, 2012

Open List items in Modal Dialog from CQWP /XSLT


I was working on a requirement to open list items in Modal dialog listed in Content Query Web Part.  

So what we need to do here is just remove href attribute and adding onclick event to call ModalDialog and open the url (SafeLinkUrl). Also added onmouseover event to show hand as cursor when mouse over on the text.

<a onclick="javascript:SP.UI.ModalDialog.ShowPopupDialog('{$SafeLinkUrl}'); return false;" onmouseover="javascript:this.style.cursor='hand';" title="{@LinkToolTip}">

Here are the steps 
  1. Open the root site with in SharePoint designer and go to All items > Style library> XSL Style Sheets.
  2. Open ItemStyle.xsl file and edit it (take the backup to be safe)
  3. Paste below section to the end of the file just above </xsl:stylesheet>.
<xsl:template name="ModalDialogBullets" match="Row[@Style='ModalDialogBullets']" mode="itemstyle">
        <xsl:variable name="SafeLinkUrl">
            <xsl:call-template name="OuterTemplate.GetSafeLink">
                <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
            </xsl:call-template>
        </xsl:variable>
        <xsl:variable name="DisplayTitle">
            <xsl:call-template name="OuterTemplate.GetTitle">
                <xsl:with-param name="Title" select="@Title"/>
                <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
            </xsl:call-template>
        </xsl:variable>
        <div class="item link-item bullet">
            <xsl:call-template name="OuterTemplate.CallPresenceStatusIconTemplate"/>
            <a onclick="javascript:SP.UI.ModalDialog.ShowPopupDialog('{$SafeLinkUrl}'); return false;" onmouseover="javascript:this.style.cursor='hand';" title="{@LinkToolTip}">
                        <xsl:value-of select="$DisplayTitle"/>
            </a>
        </div>
    </xsl:template> 

4.      Save the file and check it in. 
5.      You need to update the ItemStyle of CQWP and apply this one.  Edit CQWP > Presentations > ItemStyle.

That’s all. Hope this Help.

Wednesday, April 11, 2012

Open PDF files in browser


In SharePoint when you try to open a PDF you are forced to download the file. Downloading can be avoided. To fix this we need to do some config changes in Central Admin. There are two options to achieve the same
First option –
  • Go to Central Administration > Application Management > Manage web application under web application
  • Select the web application then click on general settings from Ribbon > then Change “Browser File Handling” to Permissive.
  • Click Ok.
  • Do an IISRESET
Note - From a security point of view I don't think it is a good idea to change the 'Browser File Handling' to 'Permissive'.

Here is another option to allow PDF to be opened in browser from Sharepoint.

  1. Open the "SharePoint 2010 Management Shell", running as Farm Administrator;
  2. Execute the following commands – (Replace < YourSiteURL> with your web application url)  

$webApp = Get-SPWebApplication http://YourSiteURL
$webApp.AllowedInlineDownloadedMimeTypes.Add("application/pdf")
$webApp.Update()

           Or you can save as PowerShell script and execute that
            Here is script  

           $webApp = Get-SPWebApplication http://YourSiteURL
           If ($webApp.AllowedInlineDownloadedMimeTypes -notcontains "application/pdf")
           {
               Write-Host -ForegroundColor White "Adding Pdf MIME Type..."
               $webApp.AllowedInlineDownloadedMimeTypes.Add("application/pdf")
               $webApp.Update()
               Write-Host -ForegroundColor White " Pdf MIME Type added and saved."
            } 
            Else {
                  Write-Host -ForegroundColor White "Pdf MIME type is already added."
            }

      3. Do an IISRESET.

if you want to open an .msg file, or other file type saved in SharePoint without being asked to download it first; you just have to change the MIME type.
Like for .msg file $webApp.AllowedInlineDownloadedMimeTypes.Add("application/vnd.ms-outlook")

Hope that helps anyone out there.