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.

  • Are you looking for powershell, .Net or either? Mar 27, 2013 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, 2013 at 22:24

1 Answer 1


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.

Reference: http://technet.microsoft.com/en-us/library/ff608004.aspx

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!): http://blog.mastykarz.nl/granting-retrieve-people-data-search-crawlers-administration-permission-user-profile-service-application-powershell/


  • 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, 2013 at 22:29
  • Naming format is -SiteNamingConflictResolution I see what you mean about the other attributes. Mar 29, 2013 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. Jul 23, 2014 at 13:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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