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

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:

http://blog.falchionconsulting.com/index.php/2007/08/set-my-sites-naming-format/

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

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/

M

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 at 13:10

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.