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

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working on an automated SharePoint 2013 production environment deployment.

I'm searching for a programmatic means of manipulating all values found on the "My Site Settings" page of CA. Reverse engineering the page, it appears to use several internal classes/methods to read and write values. I would prefer to avoid using reflection to pull MethodInfo's and Invoke them myself due to future support concerns. Here is an example of that approach:

Any direction regarding classes/namespaces/approaches I should be looking at would be much appreciated.

Edit: Per my comment below, I am able to manipulate SOME of the values. I am using Set-SPProfileServiceApplication to manage MySiteManagedPath and MySiteHostedLocation. I am using UserProfileManager to touch MySiteEmailSenderName. I am unable to find a way to programmatically manipulate the rest of the settings. Under the hood it's calling internal methods on the admin page.

share|improve this question
Are you looking for powershell, .Net or either? – Ryan Erickson Mar 27 '13 at 1:09
Powershell is preferred. .Net is acceptable if I have to go that direction. I can wrap it up in a cmdlet if need be. – Pete M Mar 27 '13 at 22:24

I love Gary's work, but that only applies to SharePoint 2007. The UPA has undergone huge changes through 2010 (2013 not so much). But PowerShell access has significantly improved. you are looking for Set-SPProfileServiceApplication to access the settings, for example -MySiteHostLocation.


After spending a bit of time on this most of the settings are unavailable currently (RTM-SP1). I did ask around and one new nugget is that you can set the permissions for the crawler on the UPA (Thanks Waldek!):


share|improve this answer
Unfortunately not all settings are available via SPProfileServiceApplication. I'm using it to set MySiteHostLocation and ManagedPath so far. I'm able to get at the MySiteEmailSenderName via the UserProfileManager. I'm aware there is a bug with search center settings, I'll tackle that later. Getting at Site Naming Format, Language OPtions, Security Trimming and My Site Cleanup all appear to be managed by internal classes/methods. I'm at a loss for programmatically touching those in a supported way. – Pete M Mar 27 '13 at 22:29
Naming format is -SiteNamingConflictResolution I see what you mean about the other attributes. – Matthew McDermott Mar 29 '13 at 14:11
I see the down vote. Please provide a reason so I can improve this answer. The fact that these are unsupported settings in PoSh is no reason for a down vote. – Matthew McDermott Jul 23 '14 at 13:10

Your Answer


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.