SCOM Rule Run As Account

Forum: Operations Manager4
Viewing 3 posts - 1 through 3 (of 3 total)
  • #226859
    Profile photo of Eric

    How do you add a run as account for a performance collection script or basically a rule? I know how to do it for a script monitor by editing the xml management pack. However, when i follow the same for a rule and try to import the mp I get the error “XSD verification failed for the management pack. The ‘RunAs’ attribute is not declared.”

    I created the rule through the console then exported the mp to edit it.

    Profile photo of Anthony Milic
    Anthony Milic

    Hi Eric,

    I’m posting this as it might help someone else. Below is a rule I made to backup our MPs using PShell (script omitted for brevity). You need to put the RunAs attribute in the “WriteAction” tag – in bold below.
    <Rule ID=”Sample.Rule.Timed.PShell.Script.LogEvent” Enabled=”true” Target=”SystemCenter!Microsoft.SystemCenter.RootManagementServer” ConfirmDelivery=”false” Remotable=”true” Priority=”Normal” DiscardLevel=”100″>
    <DataSource ID=”Scheduler” TypeID=”System!System.Scheduler”>
    <Interval Unit=”Minutes”>5</Interval>
    <ExcludeDates />
    <WriteAction ID=”ExecuteScript” RunAs=”Sample.RunAsProfile.LogEvent” TypeID=”Windows!Microsoft.Windows.PowerShellPropertyBagWriteAction”>
    <ScriptBody>PShell code here</ScriptBody>


    Profile photo of Leon Goodenough
    Leon Goodenough

    Tried this and initially the MP would not import when I used the actual name of the runas account. Error indicated that it could not find the referenced account. I found  ‘secure references’ and used that ID as the runas profile. I was able to re-import the MP okay, but when the rule was scheduled to run, it no longer ran.

    <WriteAction ID=”ExecuteCommand” RunAs=”RunAsProfile_320c221174d34933b6d6a29580c2868e” TypeID=”System!System.CommandExecuter”>

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.