Now, from the library settings, Click on "Add from existing site content types" link under "Content Types" section.

Choose the content type we created at step 1 (In my case, it is: "Project Plan") and click "OK"

Modify the default view of the document libraries to include Bar code columns.

That's all! We are done! Create new document under the document library, See the bar codes in action!!

Same steps applies to SharePoint 2007/ SharePoint 2010 and for SharePoint 2013.

How to Set Custom value to SharePoint Bar Codes?
Well, But the problem is: SharePoint automatically generates unique 10 digit bar code value! we may not need it so in some cases, isn't it? we want to set bar codes to specific value.

Alright, How do I set bar code based on file's meta-data property? We can programmatically set Bar code values. Here is the sample code for SharePoint 2010 custom barcode generator.

Monday, September 23, 2013

So you are excited by SharePoint 2013's new features and tend to migrate from SharePoint 2010 to SharePoint 2013? Well, this article walks through moving from SharePoint 2010 to SharePoint 2013 step by step, assuming all necessary migration preparations and planning strategies are done, lets move to the core migration process.

Change the Authentication to Claims: Claims authentication is the default authentication in SharePoint 2013. Many dependent services (like Office Web Apps) require Claims authentication in SharePoint 2013. So before migration convert your SharePoint 2010 web applications from Classic mode (which is default in SharePoint 2010) to Claims. Technet Reference: http://technet.microsoft.com/library/gg251985 Also, If you have "Forms" authentication, make sure its configured in your target farm before migration.

Cleanup Before Migration - Clean up an environment before an upgrade to SharePoint 2013 - This includes deleting unused sites/site collections, Removing unused features and solutions, Delete orphaned users and sites, Cleanup old document versions, Removing features which are not supported by SharePoint 2013 (such as Web Analytics). Technet Reference: http://technet.microsoft.com/en-us/library/ff382641.aspx

Its recommended that you run database consistency check before taking database backup from SharePoint 2010 farm.

No more In-place upgrade from SharePoint 2010 to SharePoint 2013! In
other words - No direct upgrade is possible from SharePoint 2010 to
SharePoint 2013. You can't install SharePoint 2013 on top of SharePoint
2010 (as we can install SharePoint 2010 on top of SharePoint 2007) . So
only migration is allowed in SharePoint 2013. You can't re-use your
existing Hardware for SharePoint 2013 (Also you can't install both
SharePoint 2010 and SharePoint 2013 on same machine).

As we are going to use the existing content database from SharePoint
2010, Delete the default
content database associated with your new web application. If you failed to delete the web application's root site database, you
will get "Orphaned Sites" issue on running Test-SPContentDatabase cmdlet as part of migration process. This
is because the root site collection exists in both content databases and leads to conflict!

Alright, This article assumes new SharePoint 2013 Farm is already installed and configured.

Optionally, you can Setting SharePoint Content databases to read-only before taking backup. But why?
because you may want users to continue using SharePoint 2010, same time preventing any data in-consistency on content migrated to SharePoint 2013. To do so: Go to SQL Management Studio >> database
properties >> Options >> Set Database Read-only to "True".

Backup Databases from SharePoint 2010 SQL Server:

Log-in to SQL Server box of your SharePoint 2010 Farm

Open SQL Server Management Studio, Expand Databases node

Right Click your content database, Choose Tasks >> Backup

Set the backup type to "FULL", specify the backup destination and click on "OK" to start backup process

Wait for the backup to complete.

Repeat this procedure for All content databases of desired SharePoint 2010 web applications.

Restore Database on SharePoint 2013's SQL box:
Next step is to Restore
all databases taken from SharePoint 2010 to SharePoint 2013 SQL Server.

Once restored, Go to Database properties, Click on Options Tab, Set Database Read-only to False. (If you made it read-only before taking backup!)

Step 3. Verify content databases with Test-SPContentDatabase:
No more STSADM -o PreUpgradeCheck and its replaced with the PowerShell cmdlet: Test-SPContentDatabase. So we got to execute Test-SPContentDatabase cmdlet which scans content databases of the provided web application and addresses any issues found.

Once mounted the content database to web application successfully, The site collection is accessible in SharePoint 2010 Mode!

Step 5. Upgrade Site Collections to move them into SharePoint 2013.
One more step to complete our migration: Upgrading site collections.
By default, after migrating from SharePoint 2010 to SharePoint 2013, All
migrated site collections will be on SharePoint 2010 format, retaining its
old look and feel and other functionalities. We've to explicitly migrate all site collections to SharePoint 2013.

This can be done by Site collection administrators by clicking links from upgrade reminder banner.

At Site Collection Level, you can make use of Site Collection Health Checkup:
New
in SharePoint 2013, Site collection Administrators can perform health
checkup at site collection level before upgrading site collections from
SharePoint 2010 mode to SharePoint 2013! Navigate to

Site Settings >> Site Collection Administration

Click on Site collection health checks(Or use PowerShellTest-SPSite -identity <URL>)

Deferred site collection upgrade
- Its a replacement for Visual Upgrade feature (Once site collection is
upgraded, can't be rolled back). SharePoint 2013 shipped with files to
Support SharePoint 2010. Not just user interface but actual SharePoint functionality itself. E.g. You can
find 14 folder on SharePoint 2013 installation. So all files will still
be maintained. E.g. Features, Event Receivers,
Solutions can be deployed on 14 hive, etc. So, almost all of
your existing SharePoint 2010 customizations should just work fine.

You will see a banner on top of Site collections now!

To
upgrade the site collections: Click on "Start now" link on the banner
(You can get there by going to Site Settings >> Site Collection Upgrade as
well.) Confirm the site collection Upgrade
We can monitor the upgrade progress with
SiteUpgrade.aspx page, which provides a link to an upgrade log for
troubleshooting purposes. From here, you can either start the actual upgrade or create a preview site.
SharePoint Farm Administrators can do it through bulk through PowerShell script:

Upgrade-SPSite -identity "http://sharepointsite" -VersionUpgrade

We can upgrade all site collections under the specific web application with PowerShell cmdlet:

Once upgrade completed successfully, Verify Your site collection is with all new SharePoint 2013 features.

Get Upgrade Status:
Upgrade can be time consuming where there is a large number of site collectionsexists on the given content database. Get the Status of upgrade from "Upgrade Status" page in central administration page (Central Admin >> Upgrade and Migration >> Check upgrade status )! Or use the PowerShell script:

That's all, We are completed now! As a best practice, Review event logs and ULS logs after migration completed successfully!!

Here is our SharePoint 2010 site:
Here is the SharePoint 2010 site migrated with SharePoint 2013:
The Final site after site collection upgrade:

Additional Things to Consider:

You can try the Demo Upgrade with Evaluation Site Collection:
Demo
upgrade allows to get the SharePoint 2013 preview of existing site
collection by making a copy. You can try it by clicking "Try a Demo
Upgrade" link either from "Upgrade Reminder banner " or by going to

Site Settings >> Site Collection
Admin

Site collection upgrade, click on Try a demo upgrade

Site collection admin receives an email when timer job “Create upgrade Evaluation Site
Collections” creates a site collection

Farm administrators can request
an Evaluation Site Collection using PowerShell:

Request-SPUpgradeEvaluationSite -identity <Site Collection URL>

This
Provisions a temporary site collection with SharePoint 2013's look and
feel to validate your site collection to get the preview of your site
collection on SharePoint 2013. Remember, the evaluation site collection
expires after 30 days, and gets auto deleted!

Remember,
while upgrading: you can't downgrade! Meaning, you can't upgrade from
SharePoint Server to SharePoint Foundation or You can't upgrade from
SharePoint Server Enterprise to Standard version!

Disable Self Service Upgrade
In some cases, you may
want to disable self service upgrade on specific site collections, for
e.g. You may want to disable upgrade on heavily customized site
collections. We can disable upgrade which hides the "upgrade Reminder"
bar at the top of the site collection eventually.

This disables
upgrade options from site the collection by removing the upgrade banner
and the "Upgrade Site Collection" button from Site collection upgrade
page of site settings. So now, the only option to upgrade is: using
PowerShell cmdlet: Upgrade-SPSite

What about Migrating Service Applications?
Just because
you can migrate service applications, doesn't mean you must! Consider upgrading service
applications from SharePoint 2010 to SharePoint 2013 when you have some
critical data in it and it involves lot of time to re-do!! I'm keeping
it aside for now, will cover this in an another article.

Upgrade from SharePoint 2007 to SharePoint 2013
Want to migrate from MOSS 2007 to SharePoint 2013? Sure, But there is no way to migrate from SharePoint 2007 to SharePoint 2013 directly! We've to Migrate from MOSS 2007 to SharePoint 2010 first (can use Staging environment for this!) and then perform SharePoint 2010 to SharePoint 2013 migration again (Or you can use 3rd party migration tools to upgrade from SharePoint 2007 to SharePoint 2013 directly) Read my related posts:

Saturday, September 21, 2013

Requirement: Create site collection in new database
Having a dedicated content database for each site collection is recommended for larger SharePoint site collections.

Create site collection in new content database in SharePoint 2010 using PowerShell:
As the Central Administration doesn't provide any direct interface, lets use PowerShell cmdlet to create site collection in new content database for SharePoint 2010 / SharePoint 2013:

The above PowerShell script creates new content database and creates site collection in that particular database. Here, Use "-ContentDatabase" parameter to set the target content database.

But wait, this will not stop SharePoint from placing new site collections to the content database created (SP2010_Content_Sales)! we've to set the MaxSiteCount and WarningSiteCount values to control any future sites.

PowerShell script to create site collection in a existing content database:
If you want to create new site collection in an existing content database, use this PowerShell script: Say, we've an existing content database: SP2013_Content_Sales and want to create our new site collection in it.

Step 1: Download and install Workflow Manager

SharePoint 2013 introduced isolation of Workflows from SharePoint. Meaning we can install workflow components either on server(s) which is part of SharePoint farm or we can have workflow components on server(s) which in NOT part of SharePoint farm (even to Azure - Cloud)! Here, Lets install workflow Manager in one of the SharePoint Application server. Its a best practice to use dedicated accounts for Workflow setup and workflow service. Workflow Setup account must have SysAdmin access rights on SQL Server and local administrator on workflow server.

In Short: Workflow Engine can be hosted outside SharePoint 2013 Farm!

To begin with installation, Log in to your target server where you are going to install workflow components by opening below download link.

In the New Farm Configuration wizard, enter the required fields, such as: Database Server, Service account user name & password, Make sure you remember or keep safe the Certificate Generation Key, as its needed when you want to add more servers to the WM farm. Make sure the service account is under local administrators group of the server.

Verify the configuration summary and proceed next.

Wait for the installation to be completed

Click on "Finish" button to complete installation on the screen states that the installation successfully installed.

Install Workflow Manager Client on All other servers of the Farm:
If you have multiple servers, download and install Workflow Manager Client on every WFE Server: http://go.microsoft.com/fwlink/?LinkID=251617 Verify the Workflow Manager Installation
Let’s verify the workflow manager Installation by accessing: http://localhost:12291 or http://<host url>:12291 (if host header configured).

Step 2: Register Workflow Manager

Alright, We've Workflow components installed. Now, the next step would be registering workflow service with SharePoint 2013. Open SharePoint Management Shell and run as Administrator:

G1SPWFE03 - is one of my WFE in SharePoint 2013 farm. 12291 is the port where Workflow Manager is configured (Get it either during installation summary or from IIS). You can also use: Get-WFFarm | ft HttpPort

AllowOAuthHttp - I'm using HTTP protocol here to allow the communication between SharePoint and Workflow Manager over HTTP.

Although the parameter -SPSite sounds like workflow manager will get activated only for the given site collection, It’s actually get activated all site collections in the given web application

Done! Lets see the output in action:
Restart SharePoint Designer 2013 and see "SharePoint 2013" listed under Platform type in addition to "SharePoint 2010 Workflow".

Still not getting "SharePoint 2013 Workflow"?
This could be because, "Workflow Service Store" hidden Feature is not enabled (such as when you use "Blank" site template, This feature may not be activated! )