Michael Schau

My SharePoint Blog

User Profile Service

Many have had problems provisioning the User Profile Service in SharePoint 2010, including myself.

My Powershell script failed and afterwards trying to manually create a User Profile Service Application in CA, I got the following error

An object of the type Microsoft.Office.Server.ActivityFeed.ActivityFeedUPAJob named "User Profile Service Application_ActivityFeedJob" already exists under the parent Microsoft.Office.Server.Administration.UserProfileService named "".  Rename your object or delete the existing object.

Sounds like a Timer Job, so I wanted to take a look at the job definitions.

TimerJobDefinitions

But now I got a "Operation is not valid due to the current state of the object".

OK, so I clearly needed to cleanup the Timer Jobs related to the User Profile Service. To do that I executed the following Powershell command.

Get-SPTimerJob | where {$_.name -match "User Profile Service*"} |  % { $_.Delete()}

Now I was able to both review the job definitions and provision the User Profile Service Application successfully.

Comments (14) -

  • Alex Clark

    1/13/2011 12:11:28 PM | Reply

    Thanks your a godsend - I had the same issue after I broke my UPS and this fixed it for me Laughing

  • Luke Costin

    2/13/2012 5:47:14 AM | Reply

    Cheers for the advice,

    Helped me out of quite a pickle there Smile

  • Macdonald

    6/19/2012 11:18:40 AM | Reply

    Excellent this fixed the issue for me!

  • Sagar Dange

    7/12/2012 12:28:12 PM | Reply

    Excellent...!

  • Asher

    10/31/2012 10:09:36 AM | Reply

    Thanks!

  • Asher

    10/31/2012 10:09:54 AM | Reply

    Thanks!

  • Asher

    10/31/2012 10:10:23 AM | Reply

    Thanks!

  • search here

    11/14/2012 5:42:32 AM | Reply

    Even I had the same problem when trying to set up the profile. I tried everything that I knew that could help me but none of them could get my job done. That’s when I searched for this and now I was able to set it up. Thanks a lot.

  • search here

    11/14/2012 5:43:11 AM | Reply

    Even I had the same problem when trying to set up the profile. I tried everything that I knew that could help me but none of them could get my job done. That’s when I searched for this and now I was able to set it up. Thanks a lot.

  • Anders

    2/21/2013 8:04:17 AM | Reply

    Surely enough, this worked. I had created a new UPS, then deleted the old one. This broke the "Review job definitions" page. Deleting the timer job of the old UPS solved it.

  • Smruti

    5/8/2013 11:51:38 AM | Reply

    Awesome...It totally fixed my issue

  • anthony

    5/17/2013 3:56:28 PM | Reply

    Excellent. This is better than blowing up everything.

  • Istvan

    7/15/2013 5:49:23 PM | Reply

    Thanks..

  • Accounting Plantation fl

    9/3/2013 7:52:59 AM | Reply

    Great piece of writing, thanks for posting.

Loading