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