Online Training On SharePoint

Thursday, 22 July 2010

SharePoint End User Videos

Good Collection of How To Videos for End Users in SharePoint:

Adding Documents to a SharePoint Site

Create a new SharePoint Site Collection Administrator

Add Links to a SharePoint List

Add SharePoint Site to your Trusted Sites in Internet Explorer

Add Users to a SharePoint Security Group

Approve another user's SharePoint Blog Post

Change SharePoint Navigation to a Site Tree View

Change the SharePoint Site Image

Change the SharePoint Site Title and Description

Change a SharePoint User's e-mail address

Change a SharePoint User's password

Create a SharePoint Calendar Appointment

Create a Document-specific SharePoint Alert

Create a New SharePoint User

Create a SharePoint Announcements List

Create a SharePoint Blog Posting

Create a SharePoint Calendar

Create a SharePoint Contacts List

Create a SharePoint Discussion Board

Create a SharePoint Document Library

Create a SharePoint Document Work Space

Create a SharePoint Gantt Project Management Chart

Create a SharePoint InfoPath form Library

Create a SharePoint Links List

Create a SharePoint Meeting Site

Create a SharePoint Picture Library

Create a new SharePoint Security Group

Create a new SharePoint Sub-site

Create a new Task in a SharePoint Tasks list and assign it to a user

Create a SharePoint Wiki Document

Create a SharePoint Wiki Library

Customize a SharePoint Meeting Site

Delete a SharePoint Meeting Site when you are finished with it

Edit SharePoint Blog Categories

E-mail a SharePoint Document Library

E-mail Enable a SharePoint Discussion Forum

Enable Multiple SharePoint Blog Categorizations

Edit the SharePoint Quick Launch Menu to Customize with your own navigation options

Enable SharePoint Document Versioning

Change SharePoint Top Link bar navigation options

Manage Access Requests to your Site

Move Documents between SharePoint Document Libraries

Remove Permission Inheritance from SharePoint Sub-sites

Remove the SharePoint Quick Launch Menu

Remove Top Link Bar Inheritance from a SharePoint Site

Restore Deleted Items As the Site Collection Administrator

Restore SharePoint Site Permission Inheritance (sub-sites)

Work with the SharePoint Recycle Bin

Create a SharePoint Sales CRM Application

Work with your SharePoint Themes

Add Tabbed SharePoint Navigation Options to your Site

Add SharePoint Web Parts

Sign in as a different SharePoint User

Work with a SharePoint Gantt Project Chart

Create a Custom Site Column

Wednesday, 21 July 2010

Exporting Document Set as Zip file using Power Shell Script

SharePoint 2010 has a new feature called Document Set. Each Document Set can consist of multiple files. There is no functionality available on SharePoint UI where we can export all these files from a DocSet into a zip file. This can be achieved using Windows PowerShell Script. Here is the Script to achieve the same:

$docsettitle = $args[0]
if($args.length -eq 1)
    $maxSizeAllowed = 1000 ## ~ 1 GB
    $maxSizeAllowed = $args[1]
$web = Get-SPWeb http://localhost
$list = $web.Lists["TestLib"]
$rootFolder = $list.RootFolder
$docset = $null
foreach($docsetFolder in $rootFolder.SubFolders)
        $docset = [Microsoft.Office.DocumentManagement.DocumentSets.DocumentSet]::GetDocumentSet($docsetFolder)
$zipFilePath = "C:\" + $docsettitle + ".zip"
$stream = New-Object System.IO.FileStream($zipFilePath, [System.IO.FileMode]::Create);
$docset.Export($stream, $maxSizeAllowed)

Friday, 9 July 2010

Error While Opening Document Library in Explorer Mode

When I am opening a document library in SharePoint 2010 with Windows Explorer a error message is coming saying:
"Your client does not support opening this list with Windows explorer."

I am accessing my SharePoint site using the Windows Server 2008 with IE8. On further investigation I found that Explorer view of a SharePoint document library uses the WebDAV protocol. The WebDAV client is not installed nor enabled by default on Windows Server 2008 R2. To use this feature we need to install Desktop Experience feature and then we need to make sure that the WebClient service is started.

Thursday, 1 July 2010

Suppressing Unsupported Warning with IE 6 on SharePoint 2010

The IE6 with SharePoint 2010 is not fully supported. It will throw a warning message if we open a SharePoint 2010 site in IE6. The warning message states:
"Your Web Browser will have problems displaying this Web Page. Changes to the site may not function properly. For a better experience, please udpate your browser to its latest version."

We can hide this warning message with a change in the master page. To remove this warning message remove the following line from the master page:
<warnonunsupportedbrowsers runat="server"></warnonunsupportedbrowsers>

Sunday, 27 June 2010

How Do I Videos in SharePoint

I found lot of very useful videos on How To Series. Putting them all together here:

How To Video on SharePoint 2007

1. Install Configure Microsoft Office SharePoint Server? (Part 1): Video Link

2. Install Configure Microsoft Office SharePoint Server? (Part 2): Video Link

3. Configure Search Indexing: Video Link

4. Publish a Dynamic Excel Workbook File to Excel Services: Video Link

5. Configure Records Center: Video Link

6. Configure Keywords and Best Bets: Vidoe Link

7. Use the Business Data Catalog: Vidoe Link

8. Configure Single Sign On (SSO): Video Link

9. Install and Configure the Faceted Search Add-in: Video Link

10. Configure the Active Directory Profile Import Service: Video Link

11. Using Search Scopes: Video Link

12. Create and Configure a Business Data Catalog: Video Link

13. Create a KPI List and KPI Dashboard: Video Link

14. Use the SPDiag Tool to Analyze my SharePoint Farm: Video Link

15. Use the Permission Reporting Tool: Video Link

16. Install and Configure Microsoft Search Server 2008 Express: Video Link

17. Configure Federated Search in SharePoint Server 2007: Video Link

18. Configure My Sites On My SharePoint Server 2007 Farm: Video Link

19. Enhance User Profiles with BDC Data: Video Link

20. Install Service Pack 2: Video Link

How To Video on WSS:

1. Creating a Windows SharePoint Services Web Application and Site Collection: Video Link

2. Making Use of Managed Paths To Control Site Collection URLs: Video Link

3. How to Install a Standalone Instance of Windows SharePoint Services on a Windows Server Installation: Video Link

4. Configure and Manage the Recycle Bin: Video Link

5. Sharepoint Online Setup: Video Link

6. Installing And Activating Features: Video Link

7. Enable Forms-Based Authentication for a Windows SharePoint Services Site Collection (Using IIS 7): Video Link

8. Configure Anti Virus In Windows SharePoint Services (Using Forefront Security for SharePoint):
Video Link

9. Enable Forms-Based Authentication for a Windows SharePoint Services Site Collection (Pre-IIS 7): Video Link

10. Create a New Site Column: Video Link

11. Create Reusable Site Templates: Video Link

12. Work With Wikis in Windows SharePoint Services: Video Link

13. Configuring Alternate Access Mappings: Video Link

14. Creating a New Content Database: Video Link

15. Configure Outgoing E-mail: Video Link

16. Using Content Types: Video Link

17. E-mail-Enabling a SharePoint List: Video Link

18. Manage Web Parts: Video Link

19. How Do I: Use Content Types: Video Link

20. How Do I: Configure Quota Management: Video Link

21. Configure Forefront Server Security for Sharepoint to Block Uploading and Downloading of Specific File Types: Video Link

22. Add Forms-Based to an existing Windows Authentication Site: Video Link

23. Administer SharePoint Farm Using Windows PowerShell: Video Link

24. Work With Solutions Packages: Video Link

25. Use Master Pages to Customize the Look and Feel of My Site: Video Link

26. Migrate a Content Database: Video Link

27. Install Windows SharePoint Services on Windows Vista: Video Link

28. Migrate the Configuration Database: Video Link

29. Integrate My SharePoint Lists with the Microsoft Office Outlook Client: Video Link

30. Work with Document Templates: Video Link

31. Use the SPDiag Tool to Analyze my SharePoint Farm: Video Link

32. Use the Permission Reporting Tool: Video Link

Tuesday, 22 June 2010

Comparing Data Accessing Techonlogies In SharePoint 2010

SharePoint 2010 allows 4 ways of accessing SharePoint Data. They are:
2. Server OM
3. Client OM

The table below summarizes pros and cons of these 4 methods:
  • Entity-based programming
  • Strongly typed
  • Supports joins and projections
  • Good tools support and IntelliSense
  • Server-side only
  • New API, so new skills required
  • Pre-processing of list structure required, so changing list could break application
Server OM
  • Familiar API
  • Works with more than just list data
  • Strongly Typed
  • Server Side Only
Client OM
  • Works off the server
  • Easier than web services API
  • Works in Silverlight, JavaScript and .NET
  • More than just list data
  • New API
  • Weakly Typed
  • Standards-based
  • URL-based commands
  • Strongly typed
  • Only works with lists and Excel

Thursday, 17 June 2010

Online Training On SharePoint 2010

SharePoint is one of the most sought skills these days in the IT industry. You can see my post @ How To Learn SharePoint to know how to learn SharePoint Technologies. I offer two online course in SharePoint 2010 by using them you can learn SharePoint 2010:

 1. SharePoint 2010 Administration Course
 2. SharePoint 2010 Upgrade Course

Salient Features of the Online Training on SP2010:
1. Exclusive One to One Course.
2. Flexible Timing
3. Get SharePoint 2010 Server access for Lab Work.
4. Do it from your home. No travel required.
5. Flexible course content. Pace the training the way YOU need it.

SharePoint 2010 Administration Course: This course covers the various aspect of SharePoint 2010 Administration. The course will start from the basics of SharePoint 2010 and will cover the concepts till advanced level. No prior knowledge is required for this course. The course duration is 30 hours.

Check and Download the detailed course content:

Here is the Sample Presentation covered in the first class:

SharePoint 2010 Upgrade Course: This course is designed for the people who have working knowledge in MOSS and they want to upgrade their skills in SP2010. The course duration is 25 Hours.

Check and Download the detailed course content:

To schedule for a free demo please fill the details here or a send a mail to with the following details:

# Name
# Area of Interest (Administration/Upgrade)
# Location
# Preferable time for training

Friday, 4 June 2010

Start SharePoint Workflows with Intiation Parameters Programatically

To start the SharePoint workflows programatically by passing the initiation parameters following code can be used:
static void Main(string[] args) 
    using (SPSite spSite = new SPSite("http://localhost")) 
        using (SPWeb spWeb = spSite.RootWeb) 
            SPWorkflowAssociation workflowAssociation = spWeb.WorkflowAssociations.GetAssociationByName("WorkflowDemo",CultureInfo.InvariantCulture); 
            if (workflowAssociation != null) 
                SPWorkflow siteWorkflow = spSite.WorkflowManager.StartWorkflow(spSite, workflowAssociation, "<Data><CompanyID>zzz</CompanyID></Data>", SPWorkflowRunOptions.Asynchronous); 

    Console.WriteLine("Workflow Started with the Initiation Parameter"); 


Wednesday, 2 June 2010

Uploading a Document using Power Shell Script

To upload a single document to a document library use the following PowerShell script. This is very helpful if we want to automate deployment of files during deployment of code.
The function accepts three parameters:
1. url points to url of the sharepoint site.
2. folder points to Document Library Name
3. Document points to the Path of the file.

function Upload-SPDocument([string]$url, [string]$Folder, [string]$Document) 
        $SPSite = New-Object Microsoft.SharePoint.SPSite($url) 
        $OpenWeb = $SPSite.OpenWeb() 
        $DocumentName = Split-Path $Document -Leaf 
        $GetFolder = $OpenWeb.GetFolder($Folder) 
        [void]$GetFolder.Files.Add("$Folder/$DocumentName",$((gci $Document).OpenRead()),"") 

Tuesday, 1 June 2010

Deleting Multiple Document Sets with PowerShell Script in SharePoint 2010

We have a test document library containing around 30000 Document Sets. We wanted to delete all the docsets but it is very time consuming to delete from UI or using the Object Model. This can be achieved using the following Power Shell Script. If you want to use this Script just change the first three parameters in the script:
$webUrl = "http://testsite"
$libraryName = "DemoDocSets"
$queryLimit = 100
$docsetContentTypeName = "Document Set"
Write-Host -f Yellow "Opening Site and Document Library"
$web = Get-SPWeb $webUrl
$documentsLib = $web.Lists[$libraryName]
Write-Host -f Yellow "Done"
### Load SharePoint assemblies
Write-Host -f Yellow  "Loading SharePoint assemblies"
Add-PSSnapIn Microsoft.SharePoint.PowerShell

# get 1000 document sets at a time
$query = New-Object Microsoft.SharePoint.SPQuery
$query.RowLimit = $queryLimit
$query.ViewAttributes = "Scope=`"Recursive`"";
$query.Query = "<Where><Eq><FieldRef Name='ContentType'/><Value Type='Text'>" + $docsetContentTypeName + "</Value></Eq></Where>"

$queryResults = $documentsLib.GetItems($query)
$numDocsets = $queryResults.Count

while($numDocsets -gt 0)
    Write-Host -f Yellow "Deleting $numDocsets docsets"
    for($i=0; $i -lt $numDocsets; $i++)
    $queryResults = $documentsLib.GetItems($query)
    $numDocsets = $queryResults.Count
Write-Host -f Green "Done deleting all docsets"

Tuesday, 25 May 2010

Getting Started with PowerShell for SharePoint 2010

PowerShell is very powerful tool to help to do and automate lot of activities in SharePoint. But somtime it become exhausting to learn the commands which are too many. I found these four commands quite helpful for a head start in PowerShell for SharePoint:

1. If we want to list all the SharePoint cmdlets we can use the following command:
Get-Command “*sp*” –CommandType cmdlet
2. To get a count of all the SharePoint cmdlets grouped by Verb use the following command:
Get-Command “*sp*” –CommandType cmdlet | Group-Object –Property Verb 
3. To list all the SharePoint cmdlets grouped by Verb use the following command:
Get-Command “*sp*” –CommandType cmdlet | Format-Table –Property Name,Definition –GroupBy Verb 
4. To get help for any cmdlet use the following command. Just replace the cmdlet name with the name of the command:
Get-Help <cmdlet>-Full

Tuesday, 18 May 2010

Addding Option To Group List Items by Content Type in SharePoint 2010

In SharePoint 2007 there is option to group the List Items using the Content Type. This option is not present with SharePoint 2010 so we can not group list items based on the . I think by mistake Microsoft forgot to add that :(

This can be achieved very easily using SharePoint Designer 2010. Here are the steps to do this:
1. Create a view with all the fields which you need and also put a group by clause with any field available. This will generate all the code in the View file. I have updated the All Items view and grouped the items by one field.
2. Open the List in SharePoint Designer 2010 and open the view in which you need to modify this grouping. I am using the All Items view so I will make the changes in Allitems.aspx.
3. Locate the code which mentions the and there you will find a GroupBy Clause.
4. Edit the field for this and put it as:
5. Your final code will look like this:
<View Name="{A1737F54-FE3E-4527-81B9-51C58813F33B}" DefaultView="TRUE" MobileView="TRUE" MobileDefaultView="TRUE" Type="HTML" DisplayName="All Items" Url="/Lists/DepartmentList/AllItems.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/images/generic.png"> 
                    <GroupBy Collapse="TRUE" GroupLimit="30"> 
                        <FieldRef Name="ContentType"/> 
                        <FieldRef Name="ID"/> 

Saturday, 15 May 2010

Unable To Update Farm Credentials

I was trying to update the password for the farm service account, and get the below error message whether I do it in Central Admin or with STSADM:

Error deploying administration application pool credentials. Another deployment may be active. An object of the type Microsoft.SharePoint.Administration.SPAdminAppPoolCredentialDeploymentJobDefinition named "job-admin-apppool-change" already exists under the parent Microsoft.SharePoint.Administration.SPTimerService named "SPTimerV4". Rename your object or delete the existing object.

This error indicates that either some timer job is running or scheduled but while checking in the Central Administration I found nothing.

Later after searching for some time I found that the SharePoint Timer Service was not running.

Wednesday, 12 May 2010

Adding Custom Spellings in SharePoint

While entering the data in SharePoint List/Libraries we have the option to do the spell checking. The Spell checking feature can be activated/deactivated via a Farm Scoped feature.
This Spell check functionality checks any spelling mistake in the content which we are entering into the SharePoint List/Libraries. Suppose if we want to add some new words which should not be considered as spelling mistakes. We can do this by adding our custom dictionary. Let me show this using a example:
1. I will use Task List and in description I will put SharePoint in different ways. The only acceptable way is SharePoint. So my other Sharepoint and SharepoinT will be shown as errors.

2. Now I will create a custom dictionary. To do this create a new Document Library, "Spelling" at the root of the site.
3. Create a text file, "Custom Dictionary.txt" and add all the words that should not be recognized as spelling errors in the text file, one word per line.
4. Upload the text file to the newly created Library.

5. Now I will again use these two added words in my task description and spell check will not show any error:
6. Only one "Custom Dictionary" Document Library is possible for each site collection and the names of the Library and text file need to be exactly same as mentioned. Also the Library must be located at the root of the Portal.

Monday, 10 May 2010

Finding the SharePoint Version Number without having Server Access

While doing a demo on Public sites on SharePoint somebody I asked me how to find what SharePoint version any site is using. After some research I found that If we need to find the version of SharePoint on which a specific public facing site is running we can find it by checking the header of any page from the site. This is quite useful in the situations where we can not access the servers in which the application is deployed and we need to find the version of SharePoint (true for both 2007 or 2010) Farm. In these header we need to check the value for MicrosoftSharePointTeamServices parameter. This value will show the whole version number for the SharePoint build which this site is using.

To find the header for a site we can use any of these sites (just search on any search engine):

So to find the version of SharePoint on which is running I passed the URL of the site and this is what it returned me:

As highlighted Microsoft is using to run it's site :)

Friday, 7 May 2010

Learning SharePoint 2010 Step by Step

I am consolidating some very good links from Microsoft which will help to learn SharePoint 2010 Step by Step (See how to learn SharePoint @ How to Learn SharePoint):

3. Working With Lists

4. Working With Libraries

5. Type of Columns and Creating Columns

6. Creating and Configuring SharePoint Views

7. Working with Content types

8. Working with Web Parts

9. Types of Web Parts

10. Scorecards and reports

11. PerformancePoint Web Parts

12. How to Do Document management

13.SharePoint Permissions management

14. Workflows in SharePoint

15. Metadata management

16. Web content management

17. Digital asset management

18. Blogs and wikis

19. Business intelligence

20. Dashboards

21. Forms

22. My Sites and Social Tagging

23.Records management and compliance

24. Solutions and Templates

25. Search

26. Excel Services

27. Visio Services

28. Access Services

29.More categories

Learning PerformancePoint With Step By Step Videos

There some very nice videos on PerformancePoint with SharePoint 2010 published by Microsoft. Check them out here:

1. What’s New in PerformancePoint Dashboards

2. Open a PerformancePoint Web Part in a new window

3. Export a PerformancePoint report or scorecard to PowerPoint

4. Print a PerformancePoint dashboard or Web Part

5. Overview of PerformancePoint dashboard elements

6. Applying filters to PerformancePoint reports or scorecards

7. Explore data in PerformancePoint reports and scorecards

8. Export a PerformancePoint scorecard or report to Excel

9. Use the Quick Launch pane to find PerformancePoint dashboards and dashboard items

Wednesday, 5 May 2010

Error while creating External Content Type using SharePoint Designer 2010

I was trying to create External Content Type using SharePoint Designer 2010 but while doing so I got 2 different errors. These errors were coming even when I am the site collection administrator on the site where I was doing this.
The first error came saying "The Business Data Connectivity Metadata Store is currently unavailable."

Upon some investigation I found the Web Application under which this Site Collection was hosted was not associated to the Business Data Connectivity Service.  This needs to be done from Central Administration

Once this is done this error is solved but there is another error came when I tried to create External Content Type saying "The Server was unable to process the request due to an internal error".

This one was more difficult to understand. Later I found that any user attempting to create External Content Type is required to have BDC Metadata Catalog Permission which is given from the Central Administration.

Even the Site Owner or Site Collection Administrator can not create External Content Type if they dont have the permission here. Also any user needs to have design permission if they needs to do so.

Monday, 3 May 2010

Central Administration site not accessible in SharePoint 2010

By mistake I stopped the “Central Admin” service in central administration in SharePoint 2010 and after that I was not able to access the Central Administration site.
To resolve it I went to services and made sure all SharePoint Related Services are on (including SharePoint Administration). But still, I am not able to access Central Administration site again. Finally after running following command helped me to bring the Central Administration site back Online:
psconfig -cmd adminvs -provision -port 8000 -windowsauthprovider onlyusentlm

Wednesday, 28 April 2010

Error while running the STSADM and PowerShell Commands

I was trying to work with solutions using STSADM command. But STSADM Commands was giving the error saying that "Object Reference not set to an instance of an object" as shown:

When I started the PowerShell it has given a error saying that "The Local Farm is not accessible. Cmdlets with FeatureDependencyId are not registered." as shown

On further investigation I found that some how my access on the SharePoint Config DB was removed. After giving the access this started working fine.

Monday, 26 April 2010

Restricting the results based on a Content Type for FAST Search for SharePoint 2010

We can restrict to show the search results based on a specific content type in FAST Search for SharePoint 2010. I had a requirment where I need to filter the data and show results only from a specific library. This library was associated to a particular content type. The easiest way to acheive this to do a query and filter the data based on the content type. I will now explain how we can do this. First we need to create a property in FAST Search. To see the detailed description on how to create a managed property check here
The important thing here is we need to select the ows_contenttype crawled property as crawled property:

Also we need to make sure to check the Query Property while creating this managed property:

Now once this is done we need to do a full crawl so that we can do query on this managed property.

I have created my managed metadata with the name contenttypeproperty. Also lets asssume my content type name is democontenttype. Now we can do a search like
test contenttypeproperty:democontenttype
With this query the search will only return the items having the content type as democontenttype.

On the similar lines if we just need to return the documents in the search results we can change the query to:
test contenttypeproperty:document
With this query it will only be showing the documents in the search resutls core web part.

Wednesday, 21 April 2010

Contributor getting error while adding specific Web Parts in SharePoint 2010

With SharePoint 2010 the SharePoint Groups inheriting the contributor permission can not add specific web parts (as an example Content Editor Web Part) into a SharePoint Page. The users will get the following error (A Web Part or Web Form Control on this Page cannot be displayed or imported. You don't have Add and Customize Pages permissions required to perform this action) as shown:

But the confusing part is same user can add some other Web Parts like List View Web Parts without having this issue. Behind this behavior there is a logic to make these web part secured against the cross site scripting attacks.
Now we have a permission with the name Add and Customize Page.

This permission is not granted by default to the Contributor permission level. If we add this permission to the permission level users having contributor permission level will be able to add any web part to the page. This permission is given by default to Designer group. If these Web Parts are already added to the page and if the Contributor can only edit some of the properties.

There is another side of this story as well. If we dont want to give this permission to the contributors but still want that they should be able to add the web parts which were not allowed by default, we need to make a change in the Web.Config File. There is a new parameter introduced with the Safe Control entry with the name "Safe". This parameter decides which web parts are SAFE to be added by the people who dont have the Add and Customize Page permission. For any web part if we set this property to be False then the people not having Add and Customize Page permission will not be able to add this web part on the Web Part Page inspite they are the contributor.

I will change this property to Content by Query Web Part as below to false.

<SafeControl Assembly="Microsoft.SharePoint.Publishing, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.Publishing.WebControls" TypeName="ContentByQueryWebPart" Safe="false" AllowRemoteDesigner="True" SafeAgainstScript="True" />
Earlier when the Safe flag was set to True contributors were able to add this web part without any issue. Now if they try to add this web part they will get the following error (A Web Part of Web Form Control on this Page cannot be displayed or imported. The type is not registered as safe):
So if you want that contributors in your site should be able to add all the web parts we can change the value for this property.

Tuesday, 20 April 2010

Script to Create multiple SharePoint Site Collections

I had a requirment where we need to create multiple site collections and sites. It is very time consuming to create sites from UI one by one. To create sharepoint sites in bulk we can use a PowerShell script.
To achieve this we will pass a CSV file to the PowerShell script. The CSV file has the data in the following format:

Url                                               Owner             Language       Template
http://localhost/sites/demo1 domain\administrator 1033                STS#0
http://localhost/sites/demo2 domain\administrator 1033                STS#0
http://localhost/sites/demo3 domain\administrator 1033                STS#0

lets store this file in C: drive and then I will import this CSV file using the PowerShell command. Now we can execute a PowerShell script which will create bulk SharePoint sites based on the data in the CSV file.

import-csv $csvfile | where {new-spsite -Url $_.Url -OwnerAlias $_.Owner -Language $_.Language -Template $_.Template}

Writing to ULS Logs using PowerShell in SharePoint 2010

With SharePoint 2010 the capability to write in ULS Logs has been significantly improved. We can now easily write our own custom message using SharePoint Object model or PowerShell:

Following PowerShell script can be used to write to ULS logs:
$diagSrc = [Microsoft.SharePoint.Administration.SPDiagnosticsServices]::Local
$diacategory = new-object Microsoft.SharePoint.Administration.SPDiagnosticsCategory(“My Category”,
[Microsoft.SharePoint.Administration.EventSeverity]::Error )
$diagSrc.WriteTrace(0, $diacategory, [Microsoft.SharePoint.Administration.TraceSeverity]::Monitorable, “Write your log here” )

If we need to write using SharePoint Object Model following code can be used:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint.Administration;

namespace CustomMessageToULSLog
    public class ULSLogMessage
        public static void Main(string[] args)
            SPDiagnosticsService diagSrc = SPDiagnosticsService.Local;
            diagSrc.WriteTrace( 0, 
                                                    new SPDiagnosticsCategory("Custom category",  TraceSeverity.Monitorable, EventSeverity.Error), 
                                                    "Writing to the ULS log:  {0}",
                                                    new object[] { "My Custom Message!"});           

Friday, 9 April 2010

Using Multiple Search Results Core Web Part in a SharePoint Page

I was having a requirment where I need to customize the Search Result and I need to use two Search Core Results Web Parts. One will be displaying the normal results and one of the Web Part will display the results from only a specific scope. If we just put the scope in the Scope field this will not work. When the users will do the query both the search results will be going to show the same data. To make it working we have two options:

1. Either select the different query name for each web part. So we can have User Query in one Web Part and in another Web Part we can have Query 2 or so on.

2. If we want to use User Query then we can put the scope name in the Append Text To Query property.

This does not work as the two web parts that use the same query ID modify the same Query object and internally it passes the same query.

Wednesday, 7 April 2010

Creating New Sort Property in FAST Search for SharePoint 2010

FAST Search for SharePoint 2010 allows to add additional sorting fileds to sort the data in Search Results Core Web Part. With this we can add our own fields on which we want to sort the data. This capability is not available with the SharePoint 2010 search. This post will explain how to add a new field in the Search Action Links. Here are the steps to achieve this:

1. I added a column with the name Writer in one document library and populated with some data.
2. Initiate a crawl so that this column appears as a crawled property.
3. To find the list of all the crawled properties go to Central Administration and then go to your  FAST Query SSA. In the left hand side there is a menu item for FAST Search Administration

4. Now inside Crawled Property Category we have a category for SharePoint. Once the data is crawled Writer should be available as crawled property in this category:

5. Now this Crawled property needs to be associated to a Managed Property. We will create a new managed property for this.
6. Go Back and click on the Managed Property link and click on Click on Add a Managed Property.
7. Fill the required details and select the Type as Text. In the Mapping to Crawled properties select the ows_writer. There is a checkbox to make a property as Sort property. This property allows the managed property to act as sorting property. Make sure to check this box:

8. Once this is done this Managed property will be available to be added as Sorting property. But it does not appear by default. We need to add this explicitly in the sorting dropdown.
9. To do this go to the FAST Search Center and edit the Search Action Link Web Part. Here you will see all the managed properties which have the sorting enabled:

10. Select the managed property which we created and if you want you can make it default sorting property. Also we can change the label for this as it appears in the dropdown.
11. Once this is done the data in the core search results web part can be sorted using this property:

Monday, 5 April 2010

Disabling SharePoint Designer Workflows in SharePoint 2010

With SharePoint 2010 there is a new feature where we can disable the use of SharePoint designer workflows on the SharePoint Sites inside a Web Application. This feature prevents the use of any declartive workflows in the Web Application. This is done at the Web Application level so all the site collections inside that web application will not be able to create or use the workflows.
To disable the declarative workflows go to Central Administration site and select the Web Application. under General Setting there is a menu item for controlling the workflow for the Web Application:

Once you click on this following screen will be displayed:

Here we can disable the workflow. Once we do this, no workflows can be created in the SharePoint Site collections using the SharePoint Designer. Also we can not use the predefined workflows.

If we try to create a new workflow using SPD following error will be displayed stating "User-Defined Workflows have been disabled by the SharePoint Administrator. User Defined workflows will be unable to run."

Also once these workflows are disabled many predefined workflows are not available to be used in the site collections. Only Disposition and Three State Workflows are available to be used.

Tuesday, 30 March 2010

Content Routing While Editing the Content in SharePoint 2010

With SharePoint 2010 a new feature called Content Orgnizer is introduced. It is very helpful if we want to route the documents/contents to a specific location based on some condition or metadata specified for the content. When we enable this feature a new library called Drop Off Library gets created. Content Router routes all the content first to this document library and then from here based on the the rules the content is further routed to different document libaries or lists.
This works fine when the content is first time created as the content goes to this Drop Off Library but this content routing does not trigger when the content is edited. So as an example if we have a field associated to our content and if we specify a rule saying that whenever user puts the value as XX this needs to be routed to a specific document library. This will work fine when a user creates the content and specify the value as XX but if a user edits the content and specify the value as XX this will not work. We can not overcome this from SharePoint UI.
To solve this problem a workflow can be created using SharePoint 2010 which will move this content to Drop Off Library. Now since this content is again in the Drop Off library the routing rule can trigger and place the content in correct location. Here are the steps how to create this workflow in SharePoint Designer:
Select the Action as Send to Repository as shown. These actions are available for Document as well Document Sets.

Once we select this action this puts the following in the workflow:

When we click on this action we have three actions available:
1. Copy: This copies the content in the Drop Off Library.
2. Move: This moves the content to the Drop Off Library.
3. Move and Leave a Link: This moves the content and leaves a link in the current library.

In this Destination Router we just need to give the URL of the Site collection not the full path of the drop off library as there is only one Drop Off library possible in each site collection.

With this workflow action the content routing can be used while editing the Content.

Monday, 15 March 2010

Check your knowledge on SharePoint 2010

With Microsoft releasing SharePoint 2010 all of us need to learn many new things and keep us updated. To check how much knowledge we have I have put a test on SharePoint 2010. This test consist of 20 Multiple Choice Questions.

You can take the test on

If you get a score of more than 15 then you are going good with the learning of SharePoint 2010.

Friday, 5 March 2010

SharePoint 2010 Web Parts

<><><><><>SharePoint Server 2010 Web Parts <><><>
MossChartWebPartChartHelps you to visualize your data on SharePoint sites and portals.MiscellaneousSilverlight
BusinessDataActionsWebPartBusiness Data ActionsDisplays a list of actions from the Business Data Catalog.Business Data
BusinessDataAssociationWebPartBusiness Data Related ListDisplays a list of items related to one or more parent items from a data source in the Business Data Catalog.Business Data
BusinessDataDetailsWebPartBusiness Data ItemDisplays one item from a data source in the Business Data Catalog.Business Data
BusinessDataFilterBusiness Data Connectivity FilterFilters the contents of Web Parts using a list of values from the Business Data Connectivity.Business Data
BusinessDataItemBuilderBusiness Data Item BuilderCreates a Business Data item from parameters in the query string and provides it to other Web Parts.Business Data
BusinessDataListWebPartBusiness Data ListDisplays a list of items from a data source in the Business Data Catalog.Business Data
IndicatorWebPartIndicator DetailsDisplays the details of a single Status Indicator. Status Indicators display an important measure for an organization and may be obtained from other data sources including SharePoint lists, Excel workbooks, and SQL Server 2005 Analysis Services KPIs.Business Data
KpiListWebPartStatus ListShows a list of Status Indicators. Status Indicators display important measures for your organization, and show how your organization is performing with respect to your goals.Business Data
MSSimpleFormHTML FormConnects simple form controls to other Web Parts.Content Rollup
MSXmlXML ViewerTransforms XML data using XSL and shows the results.Content Rollup
MSPictureLibrarySlideshowPicture Library SlideshowUse to display a slideshow of images and photos from a picture library.Content Rollup
WhatsPopularWebPartWeb AnalyticsDisplays the most viewed content, most popular search queries, or most popular clicked search results as reported by Web Analytics for the site or site collection.Content Rollup
RssViewerRSS ViewerDisplays an RSS feed.Content Rollup
ContentQueryContent Query
Displays a dynamic view of content from your site.
Content RollupRequires Publishing Feature
MSUserDocsRelevant DocumentsDisplays documents that are relevant to the current user.Documents
FilterActionsFilter ActionsUse the Filter Actions Web Part when you have two or more filter Web Parts on one Web Part Page, and you want to synchronize the display of the filter results.Filters
AuthoredListFilterChoice FilterFilters the contents of Web Parts using a list of values entered by the page author.Filters
DateFilterDate FilterFilter the contents of Web Parts by allowing users to enter or pick a date.Filters
OlapFilterSQL Analysis Server FilterFilters the contents of Web Parts using a list of values from SQL Server Analysis Services cubes.Filters
PageContextFilterPage Field FilterFilters the contents of Web Parts using information about the current page.Filters
QueryStringFilterQuery String (URL) FilterFilters the contents of Web Parts using values passed via the query string.Filters
SpListFilterSharePoint List FilterFilters the contents of Web Parts by using a list of values.Filters
TextFilterText FilterFilters the contents of Web Parts by allowing users to enter a text value.Filters
UserContextFilterCurrent User FilterFilters the contents of Web Parts by using properties of the current user.Filters
MSContentEditorContent EditorAllows authors to enter rich text content.Media and Content
MSPageViewerPage ViewerDisplays another Web page on this Web page. The other Web page is presented in an IFrame.Media and Content
MSImageImage ViewerDisplays a specified image.Media and Content
SilverlightSilverlightA web part to display a Silverlight application.Media and Content
Use to embed media clips (video and audio) in a web page.
Media and Content
owaMy Mail FolderDisplays your mail folder using Outlook Web Access for Microsoft Exchange Server 2000.My InformationRequires Publishing Feature
owainboxMy InboxDisplays your inbox using Outlook Web Access for Microsoft Exchange Server 2003 or later.My Information
owacalendarMy CalendarDisplays your calendar using Outlook Web Access for Microsoft Exchange Server 2003 or later.My Information
owatasksMy TasksDisplays your tasks using Outlook Web Access for Microsoft Exchange Server 2003 or later.My Information
owacontactsMy ContactsDisplays your contacts using Outlook Web Access for Microsoft Exchange Server 2003 or later.My Information
siteFramerSite AggregatorDisplays sites of your choice.Navigation
CategoryWebPartCategoriesDisplays categories from the Site Directory.Navigation
CategoryResultsWebPartSites In CategoryDisplays sites from the Site Directory within a specific category.Navigation
TagCloudTag CloudDisplays the most popular subjects being tagged inside your organization.Navigation
SummaryLinkSummary Links
Allows authors to create links that can be grouped and styled.
TableOfContentsTable Of Contents
Displays the navigation hierarchy of your site.
Microsoft.Office.InfoPath.Server.BrowserFormInfoPath FormUse this Web Part to display an InfoPath browser-enabled form.Office Client Applications
Microsoft.Office.Excel.WebUIExcel Web AccessUse the Excel Web Access Web Part to interact with an Excel workbook as a Web page.Office Client Applications
WSRPConsumerWebPartWSRP ViewerDisplays portlets from web sites using WSRP 1.1.Office Client Applications
VisioWebAccessVisio Web AccessEnables viewing and refreshing of published Visio diagrams.Office Client Applications
MSMembersSite UsersUse the Site Users Web Part to see a list of the site users and their online status.People
MSUserTasksUser TasksDisplays tasks that are assigned to the current user.People
contactwpContact DetailsDisplays details about a contact for this page or site.People
Enable users to leave short, publicly-viewable notes about this page.
ProfileBrowserOrganization Browser
This Web Part displays each person in the reporting chain in an interactive view optimized for browsing organization charts.
PeopleSilverlight awear
ReportViewerWebPartPerformancePoint ReportThis web part displays PerformancePoint reports. Reports may be linked to other web parts to create an interactive dashboard experience. Report types include: Analytic charts & grids, Strategy Maps, Excel Services, Reporting Services, Predictive Trend charts, and web pages.PerformancePoint
FilterWebPartPerformancePoint FilterThis web part displays PerformancePoint filters. Filters may be linked to other web parts to provide an interactive dashboard experience. Filter types include lists and trees based on a variety of data sources.PerformancePoint
ScorecardWebPartPerformancePoint ScorecardThis web part displays a PerformancePoint scorecard. Scorecards may be linked to other web parts, such as filters and reports, to create an interactive dashboard experience.PerformancePoint
StackWebPartPerformancePoint Stack SelectorThis web part displays a PerformancePoint Stack Selector. All PerformancePoint web parts, such as filters and reports, contained in the same zone will be automatically stacked and selectable using this web part.PerformancePoint
AdvancedSearchBoxAdvanced Search Box
Displays parameterized search options based on properties and combinations of words.
PeopleSearchBoxPeople Search BoxPresents a search box that allows users to search for people.Search
SearchBoxSearch BoxDisplays a search box that allows users to search for information.Search
SearchCoreResultsSearch Core ResultsDisplays the search results and the properties associated with them.Search
searchsummarySearch SummaryDisplays suggestions for current search query.Search
searchstatsSearch StatisticsDisplays the search statistics such as the number of results shown on the current page, total number of results and time taken to perform the search.Search
searchpagingSearch PagingDisplay links for navigating pages containing search results.Search
PeopleSearchCoreResultsPeople Search Core ResultsDisplays the people search results and the properties associated with them.Search
SearchBestBetsSearch Best BetsDisplays high-confidence results on a search results page.Search
SearchActionLinksSearch Action LinksDisplays the search action links on the search results page.Search
TopAnswerTop Federated ResultsDisplays the Top Federated result from the configured location.Search
SummaryResultsFederated ResultsDisplays search results from a configured location.Search
RefinementRefinement PanelThis webpart helps the users to refine search results.Search
PeopleRefinementPeople Refinement PanelThis webpart helps the users to refine people search results.Search
QuerySuggestionsRelated QueriesThis webpart displays related queries to a user query.Search
DualChineseSearchDual Chinese SearchUsed to search Dual Chinese document and items at the same time.Search
VisualBestBetSearch Visual Best BetDisplays Visual Best BetSearch
Related Posts with Thumbnails