Tell me more ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I need the url of the mysite in SharePoint 2010 server. In my farm i only have one MySite host (and one corresponding user profile service) configured.

I need the information on one of the farm servers and i'm using powershell for my script.

share|improve this question
In response to ToddKlindt: twitter.com/#!/ToddKlindt/statuses/149520404845838336 – Marco Scheel Dec 22 '11 at 13:25

2 Answers

up vote 2 down vote accepted

Using the sharepoint Management Shell you can execute the following script. Replace the url with one of the application url's your are running on:

$mySiteUrl = "http://portal.contoso.com"
$sc = Get-SPServiceContext($mySiteUrl)
$upm = new-object Microsoft.Office.Server.UserProfiles.UserProfileManager($sc)
$upm.MySiteHostUrl

If no url is available take one from Get-SPWebApplication if all web apps are using the same UPS.

share|improve this answer

If you are looking for the Personal site for a user profile you can get that from the UserProfileManager.UserProfile.PublicUrl.

http://msdn.microsoft.com/en-us/library/microsoft.office.server.userprofiles.userprofile.publicurl.aspx

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.