Tuesday, May 29, 2018

Guide to Migrate Sharepoint On-Prem to SharePoint Online

A SharePoint migration is, fundamentally, about moving three things. The first two are easy, the third is the tricky part:
  1. Content: all your files, data and documents
  2. Structure: all your customizations and workflows, plus existing permissions
  3. People: getting employees to adapt to the new platform

Moving content:

Migrating content to SharePoint online should begin with a review of your existing libraries:
  • Start with an audit of your content and ask “do we want to actually spend time and money migrating this content? Does anyone even use it anymore?” If the answer to that question is a big ‘no’, don’t migrate it! Store old content you don’t use in a cheaper archive
  • You should also take this opportunity to ask whether you want to keep the structure of your content the same—perhaps you want libraries to be ordered differently, rename Sites and give access to different departments. Again, now’s the time to make changes.

The second part of content migration is, well, the migration itself. There are multiple ways you can do this:
  • Manual migration: upload content directly to SharePoint Online by connecting your existing SharePoint libraries with SharePoint Workspace. From SharePoint Workspace, content will automatically sync with SharePoint Online.
  • Microsoft FastTrack: this is Microsoft’s service to help get you into Office 365.
  • Windows PowerShell: Use PowerShell cmdlets to move content from SharePoint Server sites to Office 365
  • Third-party tools like Sharegate: simplify the migration experience by simply copying SharePoint Lists, Libraries, Sites, Workflows, and Documents with the click of a button.

Moving structures and other technical issues:

The key issue to consider with regards to migrating SharePoint structure to the cloud is to ask whether certain features of your on-premises environment will integrate well with the cloud.

  • Be aware of SharePoint Online’s limits: There’s a full breakdown from Microsoft here. Essentially, different plans will offer you different amounts of storage and library size limits. Usually this will be more than in SharePoint on-premises, but know what you’re letting yourself in for.
  • Customization: be aware that, in most instances, migrating your custom code to SharePoint Online isn’t really a possibility. You should therefore prepare for life without that custom code and explore the alternatives. These might be add-ins from the Microsoft store or looking at which of the (limited possibilities) for customization in SharePoint Online are interesting for you.
  • Bandwidth: It can be easy to overlook, but your bandwidth will significantly affect how fast you can migrate to SharePoint Online. Discuss with your provider before you make the move.

Moving people:

This is the trickiest part of any migration. If employees are used to SharePoint looking and feeling a certain way, they might struggle to adapt to SharePoint Online. And this is where some change management techniques will be very useful. 
Key practices include:

  • Make people aware of the changes you’re planning on making well in advance so they can prepare to adapt.
  • Get c-level support: if business leaders demonstrate their support for the migration, it will be harder for people to ignore.
  • Adoption campaigns: whether it’s new training, placing posters around the office or a big launch day, developing an adoption campaign so people can learn about the new platform is best practice.
  • Provide a strict cut-off date for the old SharePoint on-premises site. If it’s going to be closed by the first day of next month, make sure it actually is—no ifs or buts.

Wednesday, November 23, 2016

Create Site collection with New Content database in SharePoint

In many scenarios you will be required to create a site collection with new Database to satisfy database growth/flexible site collection, which can later move to different web application.

Let’s see step by step how to create a SharePoint site collection with a separate content database using Powershell for SharePoint.


Create a managed path under web application : 
Go To Central Admin >> Application Management >> Create Site Collection

Select Defined managed Paths

Enter Site collection name and Type "Explicit Inclusion"

Click on "Add Path".


Now we need to create Content Database to host the site collection. Remember we only have Defined managed path and not created Site Collection Yet.

Run below command under Powershell window:

New-SPContentDatabase -Name "WSS_Content_test" -DatabaseServer "Servername"  -WebApplication "http://xyz:6001/test"

$ContentDatabase = Get-SPContentDatabase "WSS_Content_test"

Above command will create Content Database on SQL server.


In Final step we need to create site collection with new content database we just created.

Define all parameters:

$url = "http://xyz:6001/test"
$ContentDatabase = "WSS_Content_test"
$WebsiteName = "Test"
$WebsiteDesc = "Site test portal"
$Template = "STS#1"
$PrimaryLogin = "domain\adminuser"
$PrimaryDisplay = "Admin"
$PrimaryEmail = "xyz@domain.com"

Execute the command:

New-SPSite -Url $url –ContentDatabase $ContentDatabase -Name $WebsiteName –Description $WebsiteDesc  -Template $Template -OwnerAlias $PrimaryLogin –OwnerEmail $PrimaryEmail

Site template we selected STS#1 is for blank website. Incase you need to explore more template types, please refer this wonderful article.

Taaada!! Site collection is created with new content database in just three steps.

Friday, February 26, 2016

Tip - In SharePoint 2013 Change the "SharePoint" text in Suitbar - SharePoint Branding

If your goal is simply to change the text, or hardcode a link without the need for any code behind, you could do it even easier with PowerShell.

Changing the SharePoint text to something else using PowerShell



Power Shell Script:

$webApp = Get-SPWebApplication http://urlofsite:2016
$webApp.SuiteBarBrandingElementHtml = "Text Goes Here" 
Thanks we will share some more findings and articles on SharePoint 2013 branding. till then cheers.

Thursday, April 2, 2015

Move-SPUser Failed with error "The site with the id "GUID" could not be found.


Think about this scenario,  you are trying to run the migrate user command to migrate the user from one ID to new id in he certain situation.
  1. User ID get deleted from AD and recreated but with new SID
  2. User id change from One Domain to other domain
  3. User ID got changed after her last name changed.
You run the following command:
PS C:\temp>$user = Get-SPUser -web https://webapplication url-Identity "domain\username"
PS C:\temp>Move-SPUser -Identity $user -NewAlias "domain\testuser" –IgnoreSID -Confirm:$false
Move-SPUser : The site with the id ebaf8908-78B9-4BAF-9845-56556B2BE628 could not be found.
At line:1 char:12
+ Move-SPUser <<<<  -Identity $user -NewAlias "domain\testuser" -IgnoreSID
    + CategoryInfo          : InvalidData: (Microsoft.Share...PCmdletMoveUser:
   SPCmdletMoveUser) [Move-SPUser], FileNotFoundException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletMoveUser

Even with Stsadm command:

stsadm.exe -o migrateuser -oldlogin "domain\user" -newlogin "domain\testuser" -ignoresidhistory
The site with the id ebaf8908-78B9-4BAF-9845-56556B2BE628 could not be found.
Now if you trying to get the details about the Site ID & run the below command:
 PS C:\temp>get-spsite  -identity "ebaf8908-78B9-4BAF-9845-56556B2BE628"
Get-SPSite : Cannot find an SPSite object with Id or Url: ebaf8908-78B9-4BAF-9845-56556B2BE628.
At line:1 char:11
+ get-spsite <<<<  ebaf8908-78B9-4BAF-9845-56556B2BE628
    + CategoryInfo          : InvalidData: (Microsoft.Share...SPCmdletGetSite:
   SPCmdletGetSite) [Get-SPSite], SPCmdletPipeBindException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletGetSite


Migrate / Move user go through all sites in the content databases & User Profile. If there is any orphan sites in the content database then this issue occurred.


If you have only few content databases in your farm then run the below mentioned script against each content DB and see if its worked.
Select * from userinfo with (nolock) where tp_siteid like '%ebaf234348-78B9-4VAF-9845-56556B2BE628%'
If you have many databases across on couple of servers then run this
EXEC sp_MsForEachDb 'use [?]; SELECT "?" AS [databasename], ID FROM [?].dbo.AllSites with (Nolock) WHERE ID = "ebaf234348-78B9-4VAF-9845-56556B2BE628"'
You will get the Database name and ID.
Server NamedatabasenameID
Database ServerContentDatabaseebaf234348-78B9-4VAF-9845-56556B2BE628


Method # 1

You need to detach the content Databse and re attach it back to Web app will clear the orphan.
To detach a content database by using Central Administration
  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators SharePoint group.
  2. On the SharePoint Central Administration website, click Application Management.
  3. On the Application Management page, in the Databases section, click Manage content databases.
  4. Select the web application for which you want to detach a content database.
  5. Click the content database that you want to detach.
  6. On the Manage Content Database Settings page, select the Remove content database check box.
If the content database contains data, you will receive a warning. Click OK to continue with the operation.
  1. Click OK to confirm the detachment, or click Cancel to stop the operation without detaching the database.
After detaching the content database in Central Administration, the content database still exists in SQL Server.
To attach a content database by using Central Administration
  1. Verify that the user account that is being used to perform this operation is a member of the Farm Administrators SharePoint group.
  2. Start SharePoint 2010 Central Administration.
  3. On the SharePoint Central Administration website, click Application Management.
  4. On the Application Management page, in the Databases section, click Manage content databases.
  5. On the Manage Content Databases page, click Add a content database.
  6. On the Add Content Database page:
    1. Use the web Application drop-down menu to select the web application to which you want to attach a content database.
    2. Specify the database server that hosts the database.
    3. Specify the database name. If the database does not already exist, it will be created.
    4. Specify the authentication method for the database, and supply an account name and password if you are using SQL authentication.
    5. Click OK.

Method # 2

If above method failed, then you have to create a new content Database and move all working sites except orphan to the newly created Database.

Thursday, October 30, 2014

Error: Updates are currently disallowed on GET requests. To allow updates on a GET, set the ‘AllowUnsafeUpdates’ property on SPWeb.

If you are in Central Administration > Manage Web Applications and go to the General settings option,

General settings- central admin

you might run into this error:
“Updates are currently disallowed on GET requests. To allow updates on a GET, set the AllowUnsafeUpdates’ property on SPWeb. 

Troubleshoot issues with Microsoft SharePoint Foundation.
Correlation ID: xxxxxx-xxxx-xxxx-xxxx-xxxxxxxx”

error - allowunsafeupdate

“Updates are currently disallowed on GET requests” under the General Settings. The error stack trace mentioned  ‘EnsureHttpThrottleSettings’ so it means that Central Admin is trying to update these setting on a GET request for new apps that don’t already have them.

Resolution via Powershell 

Launch SharePoint Powershell and and add these lines:

$w = get-spwebapplication http://yourwebapplicationname

The call to the HttpThrottleSettings ensures they exist and Update() saves them.

After completing these commands, you should be able to successfully launch the General Settings dialog window in Central admin.

Contact me


Email *

Message *

Total Pageviews