Thursday, October 25, 2012

Turn off Mobile View for all devices in SharePoint

Go and edit the web.config file of the site (e.g C:\Inetpub\wwwroot\wss\VirtualDirectories\<webapp>)
Add the following code to the configuration/system.web node

<browserCaps>
  <result type="System.Web.Mobile.MobileCapabilities, System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
  <filter>isMobileDevice=false</filter>
</browserCaps>

Link to Article

Friday, October 19, 2012

Powershell Restore

In SharePoint 2010 you can take a backup of a site collection using the Backup-SPSite cmdlet:
Backup-SPSite http://SPPath C:\Backup\siteCollection.bak [-NoSiteLock]


Restoring a site collection in SharePoint 2010 is just as simple:
Restore-SPSite http://SPPath C:\Backup\siteCollection.bak

Restore-SPSite -Identity <Site collection URL> -Path <Backup file> [-DatabaseServer <Database server name>] [-DatabaseName <Content database name>] [-HostHeader <Host header>] [-Force] [-GradualDelete] [-Verbose]

If you want to restore the site collection to a specific content database, use the DatabaseServer and DatabaseName parameters to specify the content database. If you do not specify a content database, the site collection will be restored to a content database chosen by Microsoft SharePoint Server 2010.

If you are restoring a host-named site collection, use the Identity parameter to specify the URL of the host-named site collection and use the HostHeader parameter to specify the URL of the Web application that will hold the host-named site collection.

If you want to overwrite an existing site collection, use the Force parameter.