Solved

Identifying My site on SharePoint 2010 & 2013

Posted on 2015-01-13
3
29 Views
Last Modified: 2015-04-26
What is an easy way to determine if someone has a "My site" on Sharepoint 2010 or 2013?
0
Comment
Question by:Lord_Dragon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 8

Expert Comment

by:Jayaraja Jayaraman
ID: 40546658
create a console app with the following code and this will show you the list of users that has my site
Display Users that have a MySite

//Get the site associated with the users
using (SPSite spSite = new SPSite(@http://localhost))
{
   //Create the server context because you are in a console application
   ServerContext siteContext = ServerContext.GetContext(spSite);
   UserProfileManager pmManager = new UserProfileManager(siteContext);
   foreach (UserProfile spUser in pmManager)
   {
      if (spUser.PersonalSite != null)
      {
         using(SPSite personalSite = spUser.PersonalSite)
         {
            //Use SPSite like a normal site
            Console.WriteLine("personalSite.Url: " + personalSite.Url);
          }
      }
   }
}
0
 

Accepted Solution

by:
Lord_Dragon earned 0 total points
ID: 40561910
Is there an OTB or Out of teh Box way of doing this? I need a non code solution. thank you.
0
 

Author Closing Comment

by:Lord_Dragon
ID: 40744667
Need an OTB solution but the help is greatly appreciated.
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

MS Access 2003 or later To MySQL Migration Project Hello All, this is my second article in the category of MS-OFFICE Automation. In internet I am not able to find any comprehensive resource on the Migration of MS Access back-end to MySQL so I fin…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
Viewers will learn how to maximize accessibility options in an Excel workbook for users with accessibility issues.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question