2012 in review
The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog.
Here’s an excerpt:
4,329 films were submitted to the 2012 Cannes Film Festival. This blog had 32,000 views in 2012. If each view were a film, this blog would power 7 Film Festivals
My Links Migration from MOSS 2007 to SP 2010- Part 2
Hi There,
I discussed about My Links migration in post 1 here https://pathikhrawal.wordpress.com/2011/07/14/my-site-migration-from-moss-2007-to-sp-2010/ . In this post I am going to provide code snippet for migration of My links.
The actual migration process involves 2 major activities
1) EXPORT- Export My Links on MOSS 2007’s My Site (C# Code)
2) IMPORT- Import all My Links on SharePoint 2010’s My Site (PowerShell)
Export Process:
Details Steps
1) You can create a console application/Windows Applciation or WPF Application in Visual Studio 2008 with .Net Framework 2.0
2) Create an XML with links data. (By running our application on MOSS 2007 which will create an XML file)
XML format:
<UserProfiles>
<UserProfile userNames=“user1″ accountName=“VM-MOSS01\user1″>
<UserLinks>
<Link>
<title>hello</title>
<group>General</group>
<groupType>General</groupType>
<privacy>Public</privacy>
<url>
<![CDATA[ http://teamsites.moss.com/ ]]>
</url>
</Link>
</UserLinks>
</UserProfile>
</UserProfiles>The actual code is provided below ( this is function you can copy to you console application). Theonly one Parameter is URL- You need to provide the Central Admin URL
Import
Now for Import I am going to provide you PowerShell script to import all links for all users.
Details Steps:
1) Copy the XML file to a folder
2) Create a New ImportLinks.PS1 in the same folder and copy below code to PS1 file
Now Run the PowerShell script on SharePoint 2010 Management Shell (Run as Administrator)
Thats all ! All Links from MOSS 2007’s My Site to SP 2010’s My Site for all users.
..
Manage Timer Jobs with PowerShell
In this small post lets see how you can configure Time Jobs using PowerShell. Lets say you want to enable “Activity Feed Job” which is by default “Disabled” on the Server.
a) First run below command to Get the job definition like Name, status, GUID
Command:
get-sptimerjob | sort-object name | where {$_.Name -match “ActivityFeedJob”}
Output:
Note down the Name of the job. Usually it will be <<User Profile Service Name>>_ActivityFeedJob
More details on Get-SPTimeJob visit http://msdn.microsoft.com/en-us/site/ff607914
b) Run below command to enable Time job
Command:
Enable-SPTimerJob -Identity <<Name of Job captured in step a>>
Output:
More details on Enable-SPTimerJob visit http://msdn.microsoft.com/en-us/site/ff607892
c) Set timer job- Schedule a time job now after it is enabled
Command:
Set-SPTimerJob “upa_ActivityFeedJob” -schedule “Every 30 minutes between 0 and 59″
Output:
More details on Set-SPTimeJob visit http://msdn.microsoft.com/en-us/site/ff607916
that’s it
SharePoint 2010- Document Sets-Introduction
Introduction
Document Set is new feature added to SharePoint 2010’s document management capabilities. This a great feature to manage different set of documents within one document library. Document Set is very similar to folder within a document library but it comes with a lot of great useful features.
Document Set enables users to group multiple documents, that support a single project or task, together into a single entity. All documents in a Document Set share the metadata and the entire set can also be versioned.
Example of Document Sets
1) If you want to have a document library named Training. Training Document Library may content below set of documents
- Course Content
- Presentation
- Books for Reference
- Hands on Lab
For this you Could easily create a new Document library and then enable Document Sets for the document library. Then you can create 4 document sets as shown in below picture
Steps to create Document Library and Document Set
- Enable Document Set Feature (Site Collection Feature)
- Navigate to Site Collection Feature & Enable “Document Sets” Feature as shown in below picture
- Create a New Document Library First
- Click on Site Action ==> More Option ==> “Document Library” from available templates
- Enter name as “Trainings”
- After the Document library is created, navigate to Library (Ribbon Tab) ==>Library Setting ==> Advanced Settings ==> Content Type and select Allow Management of Content type (see below screen shot)
- Now Navigate to
- Trainings ==> Document Library Settings ==>
Content Types ==> Add from existing site content types ==> Select “Document Set” Content Type from Available Site Content Types ==> Click Add ==> Click OK
(This will associate your document library to OOB Document Sets Content Type
- Create Document Sets within Trainings Document Library
- With in Document Library ==> Select Document Ribbon Tab ==> Click on arrow of New Document Button ==> Select Document Set
- Enter Name as “Course Content” and enter some description
- Follow above steps to create below Document sets
- Presentation
- Books for Reference
- Hands on Lab
Training Document Library will look like as shown in below screen shot
& each Document set view is as shown in below screen shots (Welcome Page). This page can be used to upload documents to the document set, create/define properties, assign workflow, define view.
Below is the ribbon control for document set.

Some considerations:
- Folders are not allowed in a Document set
- You can not use Metadata Navigation in a document set
- No limit on number of documents in a document set however the display load is limited by list view threshold (which is 5,000 items)
In this post I explained about what is Document Sets and how to create/associate. I am going to explain about customization of Document Sets Content type, Programmatically create “Document Sets”
PowerShell Script to enable Visual Upgrade for all webs under a site collection
When you upgrade from Microsoft Office SharePoint Server 2007 to Microsoft SharePoint Server 2010, you can choose to use the Visual Upgrade feature to give site collection owners and site owners the opportunity to preserve the previous user interface temporarily
When you upgrade, either by using in-place upgrade or by using the database attach upgrade method, you can choose to use Visual Upgrade.
How to use this script
1) Copy below code to .PS1 file
2) Run the .PS1 using SharePoint 2010 Management Shell
3) Parameters to .PS1
ex: visualupgrade.ps1 1 “http://w7-pathikhr”
Param 1: 0 or 1
Param 2: URL of the Site Collection
To learn more about Visual upgrade visit http://technet.microsoft.com/en-us/library/ff607998.aspx
Thanks
SharePoint 2010-Backup and Recovery Guidelines
Introduction
There are two different approaches for backup and restore
- Content/Config Database Backup using SQL Server
- Backup using SharePoint Server
Lets look at each approach in details
1) Content/Config Database Backup using SQL Server
Approach one is to use SQL Server backup to back content DBs and Configuration DBs with a complete script for deployment of Web application, Site Collection, Service Provisioning.
Backup Method
a. Create Deployment script of entire Farm. This will include below components of SharePoint
i. Web Application Creation
ii. Site Collection Creation
iii. Service Application Creation and Provisioning
iv. Association of Service Application with Web Application
v. Deployment of Custom Code (WSP)
b. Use SQL Server Backup for backing up all Content Database & Configuration Database
c. Backup the entire 12 hive (c:\program files\common files\microsoft shared\web server extensions\12). This is because, frequently you will deploy code to your SharePoint farm, and you will need to restore the supporting physical files for the site to work properly.
d. You need to keep monitoring the size of your content databases. If you start hitting the 50GB mark, think of splitting them up, so the backups are done overnight before users start hitting the database in the morning.
e. Backup the entire INETPUB directory.
Restore Method
In case of disaster we need to follow below steps to recover/restore content for approach 1
a. Create Web Application and Site collection using the deployment script
b. Attach/de-attach Content database for new created Site collection
Protecting customizations
Customizations to SharePoint sites can include the following:
a. Master pages, page layouts and cascading style sheets. These objects are stored in the content database for a Web application.
b. Web Parts, site or list definitions, custom columns, new content types, custom fields, custom actions, coded workflows, or workflow activities and conditions.
c. Third-party solutions and their associated binary files and registry keys, such as IFilters.
d. Changes to standard XML files.
e. Custom site definitions (Webtemp.xml).
f. Changes to the Web.config file.
How customizations are deployed, and how changes are made to the Web.config file, have a significant effect on which tools can be used to back up and recover customizations. To provide the greatest opportunity for recovery, we recommend that you deploy customizations by using solution packages and configure the Web.config file by using Central Administration or the SharePoint APIs and object model.
Advantages:
1) it is easy to maintain and backup/restore over many SharePoint farms.
2) It needs little administrative work when moving site collection from one farm to another or one web application to another web application
3) Takes less time to backup and restore.
4) Unattached Content Database Recovery allows you to browse through the content database using SharePoint, navigate to a list or document library and save the list or library into .cmp file which can easily be moved between sites
Disadvantage
1) When restoring, web application or Site collection has be created using Central admin or PowerShell before restore
2) SQL Server does not provide SharePoint Farm backup
2) Backup using SharePoint Server:
Approach two is to use SharePoint Server backup to backup Farm, Web application, content DBs and Configuration DBs
Backup Method
a. Create backup script of entire Farm. This will include below components of SharePoint
i. Web Application backup
ii. Site Collection backup
iii. Service Application backup
Restore Method
In case of disaster we need to follow below steps to recover/restore content for approach 1
a. Restore entire farm or restore individual Web application or site collection separately
Advantages:
a. Web interface for backup and restore within Central Admin Site
b. SharePoint backup provides granular level backup for Site Collection and Web
c. SharePoint backup provides Entire Farm Level backup
Disadvantage
a. High restore time
b. No back up directly to tape
c. no custom solution files backup
Performance best practices
Backup and restore operations can consume server resources and limit server performance while the operations are running. By following these best practices, you can reduce resource usage and increase the performance of servers and the backup or restore operation
Minimize latency between SQL Server and the backup location
1. In general, it is best to use a local disk on the database server, not a network drive, for backups, and then copy the data later to a shared folder on the network. Network drives with 1 millisecond or less latency between them and the database server will perform well.
2. To avoid I/O bottlenecks, perform the main backup to a separate disk from the disk running Microsoft SQL Server 2008 with Service Pack 1 (SP1) and Cumulative Update 2.
3. By design, most backup jobs consume all available I/O resources to complete the job. Therefore, you might see disk queuing, which can result in greater than usual I/O request latency. This is typical and should not be considered a problem.
Avoid processing conflicts
1. Do not run backup jobs during times when users require access to the system. Consider staggering backups so that not all databases are backed up at the same time.
Keep databases small for faster recovery times
1. Keep databases small to speed both backup and recovery. You can do this by using multiple content databases for a Web application instead of one large content database.
Use incremental backups for large databases
1. Use incremental backups for large database such as those available with DPM 2010. Incremental backups can be restored faster and more efficiently than full backups for larger databases
Use compression during backup
1. In some circumstances, you can use compression to improve backup size (30% decrease) and times (25% decrease). Backup compression has been in introduced in SQL Server 2008 Enterprise
Follow SQL Server backup and restore optimization recommendations
1. If you are using SQL Server backups, use a combination of full, differential, and transaction log backups (for the full or bulk-logged recovery model) to minimize recovery time. Differential database backups are usually faster to create than full database backups and reduce the amount of transaction log required to recover the database
Configure SharePoint settings for better backup or restore performance
1. You can configure settings in both Central Administration and Windows PowerShell to increase backup or restore efficiency and performance
2. If you are using the Export-SPWeb Windows PowerShell cmdlet, you can use the NoFileCompression parameter. By default, SharePoint Server 2010 uses file compression while exporting Web applications, site collection, lists, or document libraries. You can use this parameter to suppress file compression while exporting and importing. File compression can use up to 30% more resources, but the exported file will use approximately 25% less disk space. If you use the NoFileCompression parameter when exporting, you must also use it when you import the same content.
3. You can also use the NoLogFile parameter. By default, SharePoint Server 2010 always creates a log file when you export content. You can use this parameter to suppress log file creation to save resources. However, we recommend that you always create logs. This is because logs can be used in troubleshooting. Moreover, log creation does not use many resources
4. If you are using the Backup-SPFarm cmdlet, you can use the BackupThreads parameter to specify how many threads SharePoint Server 2010 will use during the backup process. The more threads you specify, the more resources that backup operation will take, but the faster that it will finish, if sufficient resources are available. However, each thread is reported individually in the log files, so using fewer threads makes interpreting the log files easier. By default, three threads are used. The maximum number of threads available is 10
Consider site collection size when determining the tools to use
1. If the business requires site collection backups in addition to farm-level or database-level backups, select the tools that you will use based on the site collection size
a. Less than 15 gigabytes (GB): Use the Windows PowerShell command Backup-SPSite.
b. 15-100 GB: Use a SharePoint Products and Technologies tool, a SQL Server tool, or other database backup tool to protect the content database that contains the site collection.
c. Larger than 100 GB: Use a differential backup solution, such as Microsoft SQL Server 2005 or DPM 2010, instead of the built-in backup and recovery tools
Quality assurance best practices
You can follow these best practices to help ensure the quality of the backups of the farm environment and reduce the chances of data loss
Ensure you have adequate storage space
Be certain that the system has adequate disk space to accommodate the backup
Routinely test backup quality
Routinely test backups and validate their consistency. Run practice recovery operations to validate the contents of the backup and to ensure that you can restore the entire environment. For geographically dispersed environments, prepare for disaster recovery by setting up a remote farm. Then you can restore the environment by using the database attach command to upload a copy of the database to the remote farm and redirect users. Periodically perform a trial data recovery operation to verify that the files are correctly backed up. A trial restoration can expose hardware problems that do not show up with software verifications.
Back up ULS trace logs
The SharePoint Server 2010 tools do not back up the ULS trace logs. Data in ULS trace logs can be useful for performance analysis, troubleshooting, monitoring compliance with service-level agreements, and legal, regulatory, or business reasons. Therefore, protect this data as part of the routine maintenance. For more information about backing up the ULS logs
Store a copy of backup files off-site
To safeguard against loss from a catastrophic event, such as a fire or earthquake, maintain duplicate copies of backups in a separate location from the servers. Doing so can help protect you against the loss of critical data. As a best practice, keep three copies of the backup media, and keep at least one copy offsite in a controlled environment. This should include all backup and recovery materials, documents, database and transaction log backups, and usage and trace log backups
Procedural best practices
You can use these procedural best practices to help plan and perform backup and restore operations with better documentation, more ease, and greater assurance.
Use FQDN server names
When referring to servers in a different domain, always use fully qualified domain names (FQDN).
Keep accurate records
When you deploy SharePoint Server 2010, record the accounts that you create, and the computer names, passwords, and setup options that you choose. Keep this information in a safe place.
Have a recovery environment ready
Prepare for restore testing and disaster recovery by setting up a remote farm. Then you can restore the environment by using the database attach command to upload a copy of the database to the remote farm and redirect users. Similarly, you can set up a standby environment running the same version of software as the production environment so that you can restore the databases and recover documents quickly.
Schedule backup operations
If you want to schedule backups, you can use the Windows Task Scheduler to run them by using a Windows PowerShell script file (*.ps1).
Use the SQL FILESTREAM provider with BLOB storage
If you are using BLOB storage using the SQL FILESTREAM provider and you back up the content database with that Remote BLOB Store (RBS) defined, both the RBS and the content database will be backed up and restored when you use SharePoint tools or SQL Server tools. We do not recommend that you use RBS with other restore methods.
Source: MSDN
SharePoint 2010- Social Feedback
With SP 2010 you get a great feature called social feedback in form of Tags, Notes & Rating. While talking to my clients, colleagues and friends about SP 2010, I observed that mostly they are unaware of “Social Feedback” feature of SP 2010 and its capabilities & strong collaboration feature. I have also observed on a large SP 2010 with around 100K My Site, Tags, Notes and rating hardly utilized by My Site Users. With this post, I would like to provide more insight on how to use tags, notes and rating.
Note:This blog post is mainly targeted for end user.
Background
- Mostly users are familiar My links which used to be the top link in MOSS 2007
- However the “My Links” drop down is not available on SP 2010 by default
- The functionality exists, but hidden.
- There is a /_layouts/MyQuickLinks.aspx page on SP 2010 as well.
- SP 2010 recommends using Tags, Notes & Rating over My Links because of its rich capabilities.
Why Tags and Notes?
- Social tagging helps users categorize information in ways that are meaningful to them.
- The social tagging features of SharePoint Server 2010 help businesses to improve collaboration
- Improve the discoverability of business information
- Improve collaboration to encourage innovation
- Social tagging features help users to share information and to retrieve relevant, high-quality content more efficiently.
- Tags make it easy to find and share information about a specific subject or task
- Social tagging can improve the quality of search results by filtering against specific tags
- It can also connect individuals who want to share information with other users who have like interests.
What is a Tag
- A tag is a word or phrase that identifies an individual piece of information according to a set of attributes or criteria
- Tags make it easy to find and share information about a specific subject or task.
- Social tags, which enable users to save items of interest, organize all information for a project, and connect to others who share their interests.
- User can now “tag” any source on the internet(or intranet) which has a URL
- This is stored in User’s “tags” section on his/her My Site
What is Notes
Other users can also post “notes” relating to your tag, which effectively creates a discussion board around the “tagging” activity
Ratings
- Ratings are a feature that can be enabled at a library or list level, allowing users to give documents or items a specific rating
- The ratings are then compiled at regular intervals, and the average rating is displayed to users
- This can be of immense value for capturing feedback, and it can be applied to many, or even all, types of content
- A rating in SharePoint Server 2010 is an assessment or classification of content on a scale according to how well the content meets specific criteria
How Tags and Notes work
Lets us see How “Pathik Rawal” uses tags and notes to keep track of content he is interested in
How to Create Tags – “I like it” Tag
- As Pathik visits any page on SharePoint on any site he sees two icons, I like it and Tags& Notes
- For Example Pathik likes the “firstdoc” and wants to tag it for later review, simply select the doc and click “I Like it”
- When a user clicks on I like it, it is saved as bookmark
How to Create Tags – “your own” Tag
- If Pathik is tagging lot of content, he may classify with his own keyword to find it easily
- When user clicks on Tags and Notes, small snippets and description can be added to the page which can be set as private or public by the user.
Manage & View Tags (How to access tags, notes and bookmarks again)
- If a user wants to see all of their bookmarks\tags, the feature that is provided for this is the Activities web part that is on the Tags and Notes view of the user’s My Profile page of their My Site
- User clicks on Tags and Notes and user can see all Tags he/she has created (My Profile Page à Tags and Notes Tab)
- Sort: User can sort tags “Alphabetically or size”
- Refine by type like Tags, Notes, Private & Public
Tag Profile Page
- “The Tag Profile page is designed to show a list of all of the content where the tag has been used and the number of users who have used the tag on each content item”
- This is really the functionality of social bookmarking and tagging that makes it “social”
- In SharePoint 2010, every tag that is created has its own Tag Profile page
Note Board
- The Tag Profile Page also provides a section to write a “Note” about the tag using Note Board
- It lists all Note Board for the given tag
Tag Cloud
- SharePoint Server 2010 includes a tag cloud Web Part that appears by default on a My Site.
- Administrators and users can filter the tag cloud to display tags that are used by the owner of the My Site, specific groups, or everyone who can view the My Site
- The display can also be filtered based on date and language
- Frequently used tags are displayed in large, bold text, whereas tags that are less often used appear in smaller text.
- Each tag can display an associated number that indicates how many times the tag was applied.
Thanks!!
