SCOM 2012: Specified cast is not valid error

I got an error message in SCOM 2012 (RTM) today when I tried to open up an existing Run As Account to distribute it to a new server. The error message was this: “System.InvalidCastException: Specified cast is not valid.” The error only appeared on one account. The distribution tab of the Run As Account was empty. It looks like the account is corrupted.

So what to do? I found this forum entry and followed the steps.
And it solved it! Great! Thanks for the solution!

So here are the steps:

  1. Get the servernames which use this Run As Account – best would be if you have a group or view for it. I was lucky that I had a view, where I could get all server names through copy and past into Excel.
  2. Create a new Run As Account with the same account and password as the one which is corrupted. You can name it as you like, because you can later rename it.
  3. Distribute the account to all servers you have listed.
  4. Assign the new Run As Account to all profiles where the old account is in. I simply edited the old entry and selected the new Run As Account. Therefore you do not need to select the class again, etc.
  5. Now you can delete the old Run As Account. And if you do not want to change your documentation, then you also can rename the new Run As Account to the old name.

Published by


* 1974, female, working as a IT Senior System Analyst in a chemical company. Main topics: System Center Operations Manager 2012/2016, System Center Orchestrator 2012/2016, ServiceNow. Twitter: @NatasciaHeil

One thought on “SCOM 2012: Specified cast is not valid error”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s