locked
SCOM 1801 - The PowerShell script failed with below exception RRS feed

  • Question

  • Anyone come across this running 1801 yet?

    The PowerShell script failed with below exception
    System.Management.Automation.ActionPreferenceStopException: Command execution stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Invalid namespace 
    At line:947 char:44
    + $PowerManagement = Get-WmiObject <<<< -Namespace $("root\cimv2\power") -Query $strQuery -ErrorAction Stop 
    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)
    at System.Management.Automation.PipelineNode.Execute(Array input, Pipe outputPipe, ArrayList& resultList, ExecutionContext context)
    at System.Management.Automation.ParseTreeNode.Execute(Array input, Pipe outputPipe, ExecutionContext context)
    at System.Management.Automation.AssignmentStatementNode.Execute(Array input, Pipe outputPipe, ExecutionContext context)
    at System.Management.Automation.StatementListNode.ExecuteStatement(ParseTreeNode statement, Array input, Pipe outputPipe, ArrayList& resultList, ExecutionContext context)

    Script Name: "Lightweight non server roles discovery script"

    One or more workflows were affected by this. 

    Workflow name: LW.Microsoft.Windows.NonServerRoles.Registry.Discovery

    From what i can see and deduce is that this is a bug in "Lightweight non server roles discovery script" in the "Management Pack Recommendations" MP: Where the WMI Namespace "root\cimv2\power" doesn't exist on a server ( Pre 2008 R2) the script incorrectly terminates because the error action is set to STOP.

    All I can think of is creating a dynamic group targeting just my 2008 RTM boxen and then overriding the discovery to not run against member of said group. Anyone think of any downsides to this? 

    Pretty sure this is a bug :-)


    This posting is provided AS IS with no warranties, and confers no rights. Please remember, if you see a post that helped you please click Vote as Helpful, if it answered your question, please click Mark as Answer. I do not work for Microsoft, I manage a large estate in the private sector, my views are generally first hand production experiences. Emma's Baby Diary About Me

    Thursday, July 12, 2018 9:38 AM

All replies

  • Your diagnostic seems right and your resolution as well!
    Thursday, July 12, 2018 10:59 AM
  • I have done the above to silence the alert for my 2008 RTM boxes, but it doesn's answer what will stop working if i disabled the discovery and now i cant monitor any powershell scripts running on these nodes :-(

    This posting is provided AS IS with no warranties, and confers no rights. Please remember, if you see a post that helped you please click Vote as Helpful, if it answered your question, please click Mark as Answer. I do not work for Microsoft, I manage a large estate in the private sector, my views are generally first hand production experiences. Emma's Baby Diary About Me

    Friday, July 13, 2018 11:30 AM
  • I have the same problem with Operations Manager 1807.  Hopefully  Microsoft will update the MP. 
    Tuesday, October 2, 2018 4:03 PM
  • I have the same issue in 1807. Which  Lightweight non server roles discovery script should I disable?  The only discoveries I see in the GUI that say non-server role relate to SQL.   Am I missing something? 

    Monday, February 18, 2019 2:32 PM
  • I would still like to know which discovery to disable, but I came across a thread where they said they will fix this in SCOM 2019. 

    Fix "Management Pack Recommendations" MP 7.3.13165.0

    I have just updated to this latest version of the 'Management Pack Recommendations MP' via the Updates and Recommendations feature in SCOM2016. I now have a couple of hundred powershell failed to run warnings from a large number of servers for 'Lightweight non server roles discovery' filling my alerts pane. Previously zero script errors.

    So far been unsuccessful in resolving this issue.

    14votes
    <form action="https://systemcenterom.uservoice.com/api/v1/forums/293064/suggestions/33395701/votes.json" class="uvIdeaVoteForm" data-forum_id="293064" data-legacy-voting="" data-suggestion_id="33395701" method="post" novalidate="" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;"><button class="uvIdeaVoteFormTriggerState-no_votes uvStyle-button" style="background-image:-webkit-gradient(linear, 0% 0%, 0% 100%, from(rgb(230, 234, 242)), to(rgb(162, 172, 191)));background-background-size:initial;background-repeat:initial;background-attachment:initial;background-origin:padding-box;background-clip:padding-box;border-width:1px;border-style:solid;border-color:#a3b1cc;border-radius:4px;box-shadow:rgba(255, 255, 255, 0.5) 0px 1px 0px 0px inset, rgba(0, 0, 0, 0.1) 0px 1px 2px 0px;color:#292c33;display:block;font-family:inherit;font-size:inherit;font-weight:bold;line-height:2em;margin:0px;padding:0px 1em;text-text-shadow:rgba(255, 255, 255, 0.5) 0px 1px 0px;white-space:nowrap;width:80px;">Vote</button></form>
    <section class="uvIdeaSuggestors" style="margin:0px 0px 30px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-size:14px;line-height:inherit;font-family:Arial, sans-serif;vertical-align:baseline;clear:both;color:#292c33;">
    Paul shared this idea  ·  <time datetime="2018-02-20" pubdate="" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;white-space:nowrap;">February 20, 2018</time>  ·  Flag idea as inappropriate…
    </section><section class="uvIdeaStatus" style="margin:0px 0px 60px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-size:14px;line-height:inherit;font-family:Arial, sans-serif;vertical-align:baseline;overflow-wrap:break-word;color:#292c33;"><article class="uvUserAction uvUserAction-admin-response" style="margin:0px 0px 30px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-size:12px;line-height:inherit;font-family:inherit;vertical-align:baseline;min-height:40px;">
    STARTED  ·  ADMINNeha Garg (Admin, Microsoft System Center Operations Manager) responded  ·  <time datetime="2018-11-29" pubdate="" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;white-space:nowrap;">November 29, 2018</time>

    We have fixed this issue. The updated MP will be released post our System Center 2019 release.

    </article></section>

    Monday, February 18, 2019 2:39 PM
  • @Stech2014 

    disable the only "lightweight generic non-server roles discovery" that targets windows computer.

    the ones you are talking about are all the same discovery. the discovery targets windows computer. it discovers three sql types.

    @Microsoft Jim,

    as part of the "management pack recommendations" management pack, this discovery discovers SQL roles for the purposes of recommending management packs (not for monitoring sql). so I would guess that the only "monitoring" we will lose are alerts telling us we need to update the management pack for those versions of sql running on windows 2008 RTM servers. although I also assume that since this discovery will continue to run on servers running more recent operating systems, it will continue to keep us posted of SQL management pack recommendations. 

    also since the discovery script seems to be broken on 2008 RTM anyway, it may very well already not be discovering anything now even though it's running.

    Monday, March 18, 2019 4:21 PM