Monday, February 25, 2013

OM12 SP1 Operations Manager Shell Fails With Error: “Import-Module : The specified module 'OperationsManager' was not loaded”

Bumped into this issue with my one of my test labs. It ran SCOM 2007 R2 CU#6, was upgraded to OM12 RTM then to OM12 SP1. Afterwards the underlying Windows Server OS was upgraded to Windows Server 2012.

Issue
Even though everything seemed to working just fine, OM12 SP1 Operations Manager Shell failed to work afterwards. All I got was this annoying error when trying to run it: ‘…Import-Module : The specified module 'OperationsManager' was not loaded because no valid module file was found in any module directory…’
image

And no matter what I did or tried, this error kept coming back biting me. Both OM12 SP1 Management Servers had the same issue. Also recreating the shortcut as stated here didn’t make any difference so it was time for another approach.

Cause
Since these Management Servers were the ‘victim’ of so many upgrades (SCOM 2007 R2 > OM12 RTM > OM12 SP1 and Windows Server 2008 R2 SP1 > Windows Server 2012) I suspect something went wrong during one of those upgrades. Also because the other OM12 SP1 Management Server had the same issue as well.

Solution
I made a snapshot of both OM12 SP1 Management Servers opened Programs and Features, removed the Console and reinstalled it. Afterwards all was fine again and the OM12 SP1 Manager Shell loads and runs as expected!
image

Detailed steps:

  1. In Windows Server 2012 go to Programs and Features
    image
  2. Right click System Center 2012 – Operations Manager > Uninstall/Change > Remove a Feature;
    image
  3. Select ONLY the feature Operations Console > Uninstall. The Console (and the faulty PS module!) will be installed now;
    image

    Removal is completed within a few seconds:
    image
    > Close.
  4. Now it’s time to reinstall the Console (and the PS module): Go to Programs and Features > right click System Center 2012 – Operations Manager > Uninstall/Change > Add a Feature;
    image
  5. Select the feature Operations Console > Next > Next > make your choices for CEIP and Error Reporting > Next > Install. The Console (and a brand new PS module!) will be installed now;
    image

    The Console and the PS module are successfully installed now (takes a few seconds):
    image
    > Close.
  6. Run the OM12 SP1 Operations Manager Shell and be amazed Smile:
    image
  7. Don’t forget to apply any UR# so everything in your OM12 SP1 MG is on the same level.

Recap
When the OM12 SP1 Operations Manager Shell doesn’t work, no matter what you try to fix it, a reinstall of the OM12 SP1 Console will fix the issues Smile.

No comments: