?
Solved

Identifying My site on SharePoint 2010 & 2013

Posted on 2015-01-13
3
Medium Priority
?
31 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

Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

Question has a verified solution.

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

As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

762 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