I am trying to setup a apm template to monitor som aspects of SCCM update deployments to servers.
the one part i need help on is formatting the pending update returned values. The PS string to return the pending updates is
(Get-WmiObject -Query "SELECT * FROM CCM_SoftwareUpdate" -Namespace "ROOT\ccm\ClientSDK")
which would return this (Several of these, depending on number of pending updates)
__GENUS : 2 __CLASS : CCM_SoftwareUpdate __SUPERCLASS : CCM_SoftwareBase __DYNASTY : CCM_SoftwareBase __RELPATH : CCM_SoftwareUpdate.UpdateID="Site_D0249E54-EC0C-44EA-B097-993DA68D3E4F/SUM_6ddd239d-3161- 4d68-92cc-fadef38ea6eb" __PROPERTY_COUNT : 25 __DERIVATION : {CCM_SoftwareBase} __SERVER : CRN-SOL-02 __NAMESPACE : ROOT\ccm\ClientSDK __PATH : \\\ROOT\ccm\ClientSDK:CCM_SoftwareUpdate.UpdateID="Site_D0249E54-EC0C-44EA-B097 -993DA68D3E4F/SUM_6ddd239d-3161-4d68-92cc-fadef38ea6eb" ArticleID : 3020338 BulletinID : ComplianceState : 0 ContentSize : 0 Deadline : 20150215023400.000000+000 Description : Install this update to resolve issues in Windows. For a complete listing of the issues that are included in this update, see the associated Microsoft Knowledge Base article for more information. After you install this item, you may have to restart your computer. ErrorCode : 0 EstimatedInstallTime : EvaluationState : 0 ExclusiveUpdate : False FullName : MaxExecutionTime : 600 Name : Update for Windows Server 2012 (KB3020338) NextUserScheduledTime : NotifyUser : True OverrideServiceWindows : False PercentComplete : 0 Publisher : Microsoft RebootOutsideServiceWindows : False RestartDeadline : StartTime : 20150214223400.000000+000 Type : 2 UpdateID : Site_D0249E54-EC0C-44EA-B097-993DA68D3E4F/SUM_6ddd239d-3161-4d68-92cc-fadef38ea6eb URL : http://support.microsoft.com/kb/3020338 UserUIExperience : True PSComputerName :
I would just want the Name and URL returned in the message field.
Anyone have any suggestions on how to accomplish this feat?