Showing posts with label SCOM 2012. Show all posts
Showing posts with label SCOM 2012. Show all posts

Friday, April 28, 2017

System Center management health service credentials not found Alert


The SCOM run as profiles is a collection of run as accounts and objects that they are targeted to.

You select to add a run as account and distribute it to either a Class, Group or Object.

This all works fine and well until you choose to make the distribution for the account more secure and do not select the computers where you want this account to be distributed.

I have seen customers choosing to distribute the account to all targeted objects and then not adding those in the distribution to the run as account.

This the runas profile configuration which you see when you click on the runas profiles.


This is the runas account distribution you see when you click on the run as accounts.


This particular alert will give you the account ssid which is causing the alerts.

If you do not want this account do be distributed you can close the alert and it wont appear until there is  restart for the health service on the agent.

But if you don't want this, use the following script to find the account and then add the computer to it for distribution.



$SSID = "Enter the ssid from the alert here"





Get-RunAsAccount | Sort Name | % {$string = $null;$_.SecureStorageId | % {   $string = $string + "{0:X2}" -f $_}



 $RunAsAccountName = $_.Name

 [string]$RunAsAccountSSID = $string

 if ($SSID -match $RunAsAccountSSID) {write-host "The Run As Account is .. $RunAsAccountName"}

 }




Wednesday, April 19, 2017

Adding a powershell script in SCOM as a recovery task.

Adding a powershell script in SCOM as a recovery task.
Open the properties of the monitor.



Add the recovery task






 















Export the management pack  and open it in any text editor. You have to change the write action to powershell write action. Locate the enrty for write action and replace it with a powershell write action ID.
Replace
TypeID="Windows!Microsoft.Windows.ScriptWriteAction"

with

TypeID="Windows!Microsoft.Windows.PowerShellWriteAction"



Remove the <Arguments /> section.

Increment the version and import the management pack.