My Site Settings

Posted on Posted in SharePoint 2007, STSADM Commands

This command replaces the gl-setmysitesnamingformat command as it includes the same functionality along with additional capabilities.

I had originally created the gl-setmysitesnamingformat command to address a need to set the naming format of personal sites and I originally didn’t think I’d have to worry about the other settings on the My Sites Settings page but turns out that I did need to set one other field. So rather than create another command for just one field I decided to create a command that would allow me to set any value on that particular page.

I was originally thinking I would exclude the naming format as I already had a command for that but then decided that I’d just include it so that this command became a one-stop-shop and the other could be deprecated (I’ll leave it in but there’s not much need for it now that this command exists).

Like the original command I had to use reflection to set the internal properties (I just don’t understand why Microsoft chose not to make the UserProfileApplication object public). Beyond using the internal UserProfileApplication class the command also uses an internal method called CommitPersonalSiteSettings which is part of the UserProfileManager class (I had to use reflection to call this method but at least I’m not accessing the database directly).

I’m hoping that Microsoft will either make these methods and objects public or will create the ability to set these values via the existing properties. The core code is shown below (if using reflection scares you I’d suggest clicking away):

   1: /// <summary>

4 thoughts on “My Site Settings

  1. Hi Gary,
    i used your mysitesettings command to modify the location of mysite for my organizations as ssp is not working for us in gui mode. While hitting the mysite link from any site page its going to the new location. while clicking the profile link on mysite also its going to the new location. But, while searching for a person and then clicking on the result it is still going to the old mysite location. so.. we are getting the page not found error . inserting the new path of location in the url we are able to go to the persons profile. thanks in advance and surely would appreciate your help..

  2. It takes a while for profiles to be synched up with SSP changes. There’s a job that’s run (I think it’s profsynch but I honestly don’t remember) which synchronizes all the content databases with various changes – this will need to run before you’ll notice any change.

  3. Thanks Gary,
    There is a job definition called Profile Synchronization which is scheduled to run hourly.But last time it ran on 12/06/07. Any clue why is it so..?? Is there any way i can force a job to run now ??

  4. You can try the runtimerjob command. My guess is that if your ssp is not working that your jobs probably aren’t running either but honestly without error details I can’t be much more help than that.

Comments are closed.