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.

Adding license to SCOM

System center licensing guide:

http://download.microsoft.com/download/8/9/A/89A3F8B9-94DE-4956-A56E-F6D2B215D0E6/SystemCenter2012R2_Licensing_Guide.pdf

License check commands:

Get-SCOMManagementGroup | ft skuforlicense, version, timeofexpiration –a

Set-SCOMLicense -ProductId "Enter your license key"



Tuesday, March 21, 2017

ConfigMgr device collection queries

WQL query to create a device collection based on installed software.

select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_INSTALLED_SOFTWARE on SMS_G_System_INSTALLED_SOFTWARE.ResourceID
= SMS_R_System.ResourceId where SMS_G_System_INSTALLED_SOFTWARE.ProductName like "%NetScaler Gateway%" and SMS_G_System_INSTALLED_SOFTWARE.ProductVersion = "10.5.52.11"

Deploying Configmr updates step by step

Good post on technet.

https://gallery.technet.microsoft.com/Deploy-Software-Updates-87a403fc

 

Tuesday, February 14, 2017

Task to restart health service on agents

Here is a good link that should help in adding a recovery task in SCOM.

https://blogs.technet.microsoft.com/scom_atlas/2015/05/21/task-to-restart-scom-health-service/ 

Once the management pack is added go to Monitoring-Windows Computer. You should see the task in the Tasks pane under Windows Computer Tasks. 

SCOM agent less monitoring access denied

Today I was facing and error with monitoring agentless servers. The agent proxy was getting access denied to event logs. In my environment the health services run under the local system account.
I added the server account to administrators on the agentless server but it did not help.
I had to change the default action account profile in console for the server to run under another action account instead of the local system action account.
Then everything was peachy…