Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

My question is the same as the title:

How can I determine programmatically am in MySites?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Check the WebTemplate property of the current SPWeb, if it is SPSMSITEHOST#0, it is a MySite host.

You can use Get-SPWebTemplate powershell command in SharePoint 2010 Management Shell to see list of out of the box web templates.

share|improve this answer
    
thanks for a good hint! –  Shkipper Oct 5 '12 at 14:02

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.