Solved

Identifying My site on SharePoint 2010 & 2013

Posted on 2015-01-13
3
24 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
  • 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Converting Excel to OFX 2 80
EXCHANGE 8 93
onenote 2016 sync 40 169
Excel formula lookup multiple charges 11 63
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…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
Viewers will learn the different options available in the Backstage view in Excel 2013.
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now