views:

116

answers:

1

Hello Everybody,

Is it possible to create my site programmatically in SharePoint 2010?

  1. I have added 5 users to AD (Active Directory).
  2. These 5 users are also added in an excel file.
  3. SharePoint 2010 sample site contains a web page where it takes an input as above excel file and on click of a button I want to create 5 my sites of those users specified in excel file with some list, document libraries already created on those my sites.

Is it possible to achieve this functionality in SharePoint 2010? At present I am looking for a code snippet which will use SharePoint 2010 object model and fulfills this requirement.

A: 

The UserProfile.CreatePersonalSite method creates a personal site (My Site) for a user.

Various methods and properties of the UserProfile class can then be used to access the site, user's colleagues, quick links, etc.

Marek Grzenkowicz

related questions