Peter Hinchley

Learning in Public

✪ Error Codes for Software Update Point Failover

I recently noticed several SCCM clients were permanently pointing at an inaccessible Software Update Point (which was located behind a firewall in a gateway zone). The WUAHandler.log on each client reported an error code of 0x80072ee2, indicating a network timeout. Unfortunately, this error isn't included in the list of WSUS scan retry error codes, and a failover event wasn't triggered, leaving the client stranded.

Let's start by confirming 0x80072ee2 isn't already included in the standard list of error codes, by running the following PowerShell commands on the Primary Site Server (replace LAB with your site code):

$site = 'LAB'
$code = '2147954402' # 0x80072ee2 in decimal.

$c = gwmi -namespace root\sms\site_$site -query 'select * from sms_sci_component where componentname="sms_wsus_configuration_manager"'
($p = $c.props | ? propertyname -eq 'wsus scan retry error codes').value2 -match $code

Assuming the result is False, let's add the error code:

$component = gwmi -namespace root\sms\site_$site -query 'select * from sms_sci_component where componentname="sms_wsus_configuration_manager"'
$properties = $component.props

foreach ($property in $properties) {
  if ($property.propertyname -like 'wsus scan retry error codes') {
    if ($property.value2 -notmatch $code) {
      $property.value2 = $property.value2.insert($property.value2.length - 1, ", $code")
      $component.props = $properties
      $component.put()
    }
  }
}

Now switch to one of the affected clients. Once again, let's confirm the error code isn't defined:

$c = gwmi -namespace root\ccm\policy\machine\actualconfig -class ccm_updatesource
$c.scanfailureretryerrorcodes -contains 2147954402

Again, if the result is False, we can add the value using the following commands:

$c = gwmi -namespace root\ccm\policy\machine\actualconfig -class ccm_updatesource
$c.scanfailureretryerrorcodes += 2147954402
$c.put()

Note: You must update the Site Server before updating clients, otherwise the value assigned to the clients will be automatically removed.