question

GeorgeChristianis-0199 avatar image
0 Votes"
GeorgeChristianis-0199 asked GeorgeChristianis-0199 commented

Run a SCOM Recovery

Hi, how can I run a SCOM recovery as a diffèrent user instead of using the account which the SCOM agent is using.
Thank you

msc-operations-manager
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

CyrAz avatar image
0 Votes"
CyrAz answered GeorgeChristianis-0199 commented

The recovery can be configured to use any RunAs Profile, the same way as for a rule/monitor/datasource etc.
However that can't be done from the SCOM console, you need to edit the XML code.
Could you show us the recovery XML code?

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

HI CyrAz, thank you for your reply. Her eis an example:

<Recovery ID="My.MP.Service.ServiceState.Recovery" Accessibility="Public" Enabled="true" Target="My.MP.Service" Monitor="My.MP.Service.ServiceState.Monitor" ResetMonitor="true" ExecuteOnState="Error" Remotable="true" Timeout="300">

<Category>Custom</Category>

<WriteAction ID="My.MP.Service.ServiceState.Recovery.CommandE" TypeID="System!System.CommandExecuter">

<ApplicationName>%systemroot%\System32\windowspowershell\v1.0\powershell.exe</ApplicationName>

<WorkingDirectory />

<CommandLine>-ExecutionPolicy Unrestricted -Command "&amp; '$File/HPServiceEvent.ps1$'"</CommandLine>

<TimeoutSeconds>60</TimeoutSeconds>

<RequireOutput>true</RequireOutput>

<Files>

<File>

<Name>ServiceEvent.ps1</Name>
<Contents>

My powerhsell script



</Contents>

<Unicode>false</Unicode>

</File>

</Files>

</WriteAction>

</Recovery>

<DisplayString ElementID="My.MP.Service.ServiceState.Recovery">

<Name>MY MP - Recovery</Name>

</DisplayString>

0 Votes 0 ·