I am getting an object state error on one of my managed accounts in SharePoint 2010. I'd like to just delete that account and start fresh with a new one.

In Powershell, I run: Remove-SPManagedAccount -Identity "DOMAIN\AccountName". I get the error,

"Operation is not valid due to the current state of the object."

To my knowledge, I have moved all services away from that account. Any thoughts on how I might proceed?

  • try to reset IIS on all servers and also clear the config cache on all server in farm? – Waqas Sarwar MVP Jul 16 '14 at 19:50
  • Ah! I didn't try clearing the config cache. I bet that's it. – philipthegreat Jul 16 '14 at 20:13
  • did clear config cache helped? – Waqas Sarwar MVP Jul 16 '14 at 21:36
  • No, but I am now quite sure I've got myself into a mess of dependencies. I've gone from "Huh, that's weird" to "Well, time to rebuild the server." It's time to upgrade to 2013, anyway. – philipthegreat Jul 16 '14 at 21:58

Try the following code! I had a ghost managed account that I removed this way by having the object in a variable:

$account = Get-SPManagedAccount -Identity <ACCOUNT_NAME>
Remoeve-SPManagedAccount -Identity $account
  • This didn't solve my immediate problem, but I've upvoted because it helped me solve an unrelated issue. Thanks! – philipthegreat Jul 16 '14 at 21:09

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.