Given a deployment, return Enforcement states – long form

Given a deployment ID, the shows the failed systems with username and status. Ideal for Path Tuesday remediation, to find the failed systems.

[SQL CODE]
DECLARE @DeploymentID int
SET @DeploymentID = 16781908
SELECT
Name0 as Hostname,
--v_R_System.ResourceID,
--StateType,
--case StateType
-- When '300' Then 'Compliance'
-- When '301' Then 'Enforcement'
-- Else 'Other'
--End as "Type",
--LastStatusMessageID,
--CollectionName as 'Collection Name' ,
--CollectionID,
User_Domain0 + '\' +User_Name0 as 'User',
--User_Name0 as 'User',
--User_Domain0 as 'User Domain',
Last_Logon_Timestamp0 as 'Last Logon',
operatingSystem0 as 'Operating System',
--v_CIAssignment.AssignmentID,
AssignmentName as 'Assignment Name',

--StateID,
case StateID
When '0' Then 'Unknown'
When '1' Then 'Compliant'
When '2' Then 'Non compliant'
When '4' Then 'Succesfully installed updates'
When '5' Then 'Pending restart'
When '6' Then 'Failed to install updates'
When '7' Then 'Downloading updates'
When '8' Then 'Downloaded updates'
When '9' Then 'Failed to download updates'
When '10'Then 'Waiting for maintenance window before installing'
end as State,
StateTime,

Coalesce(v_AdvertisementStatusInformation.MessageName,'No messages') as 'Last Status Message',

--Name0 as Hostname,
--StateID,
--lasterrorcode,
case lasterrorcode
-- These were placed here by Roger using date collected from the SCCM GUI
When '0' Then 'Success'
When '-2147023261' Then 'This installation package could not be opened. Verify the update package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package.'
When '-2147023278' Then 'Another installation is already in progress. Complete that installation before proceeding with this install.'
When '-2147023248' Then 'No valid sequence could be found for the set of updates.'

-- These were pasted from a web page. That person extracted them from a dll.
-- https://social.technet.microsoft.com/Forums/en-US/0aa25d02-3163-4628-84f7-87b77a1de85b/sccm-2012-view-or-table-that-has-error-code-details?forum=configmanagerapps
When '131072512' Then 'The client is successfully assigned with Group Policy Site Assignment'
When '131073314' Then 'No more data'
When '131073589' Then 'Scan was skipped because history was valid'
When '-2016278002' Then 'Shutdown received while compressing'
When '-2016278003' Then 'Unexpected error while compressing'
When '-2016278004' Then 'Already compressed'
When '-2016278005' Then 'Failed to create file header while compressing'
When '-2016278006' Then 'Failed to create file while compressing'
When '-2016278007' Then 'Failed to create folder while compressing'
When '-2016278008' Then 'Invalid compressed header in file'
When '-2016278009' Then 'Invalid compressed file'
When '-2016278010' Then 'Failed to compress header'
When '-2016278011' Then 'File is no more there to compress'
When '-2016278012' Then 'Invalid destination for compression'
When '-2016278013' Then 'Invalid source for compression'
When '-2016278014' Then 'Compression destination not found'
When '-2016278015' Then 'Compression source not found'
When '-2016278267' Then 'SEDO lock request timed out'
When '-2016278268' Then 'SEDO lock not found'
When '-2016278269' Then 'Invalid object path for SEDO'
When '-2016278270' Then 'SEDO request ID not found'
When '-2016278271' Then 'SEDO needs lock ID or Rel path'
When '-2016278518' Then 'Certificate not found'
When '-2016278519' Then 'Invalid data in certificate'
When '-2016278520' Then 'Failed to find certificate'
When '-2016278521' Then 'Failed to decrypt certificate'
When '-2016278522' Then 'Failed to delete certificate store'
When '-2016278523' Then 'Failed to write in certificate store'
When '-2016278524' Then 'Failed to open certificate store'
When '-2016278525' Then 'Error reading peer''s encoded certificate'
When '-2016278526' Then 'Error reading certificate'
When '-2016278527' Then 'Service Host Name property is either missing or invalid'
When '-2016278776' Then 'The specified item to update is not found in Site Control File'
When '-2016278777' Then 'Invalid FQDN found in Site Control File'
When '-2016278778' Then 'Legacy type item in Site Control File'
When '-2016278779' Then 'Site not found in Site Control File'
When '-2016278780' Then 'Bad data in Site Control File'
When '-2016278781' Then 'Item type not known in Site Control File'
When '-2016278782' Then 'Item not found in Site Control File'
When '-2016278783' Then 'Unknown property in Site Control File'
When '-2016279006' Then 'SRS datasource has been modified or deleted'
When '-2016279007' Then 'SRS root folder is not present'
When '-2016279008' Then 'SRS is not installed or not properly configured'
When '-2016279019' Then 'SRS web service is not running'
When '-2016279278' Then 'Machine is not assigned to this site'
When '-2016279279' Then 'Machine is not an SMS client'
When '-2016279280' Then 'Machine not found foreign key constraint'
When '-2016279529' Then 'Auto Deployment Rule download failed'
When '-2016279530' Then 'No rule filters specifed for the Auto Deployment Rule'
When '-2016279531' Then 'Auto Deployment Rule results exceeded maximum number of updates'
When '-2016279532' Then 'Cannot Configure WU/MU as upstream server on Peer Primary'
When '-2016279533' Then 'Active SUP not selected'
When '-2016279537' Then 'WSUS Server component failure'
When '-2016279538' Then 'WSUS Server Database connection failure'
When '-2016279539' Then 'Failed to set Parent WSUS Configuration on the child sites'
When '-2016279540' Then 'WSUS server not ready'
When '-2016279797' Then 'Device Setting Item not found Foreign Key Constraint'
When '-2016280054' Then 'SDM Type not found Foreign Key Constraint'
When '-2016280055' Then 'Related SDM Package not found Foreign Key Constraint'
When '-2016280056' Then 'SDM Package not found Foreign Key Constraint'
When '-2016280057' Then 'SDM Type not found Foreign Key Constraint'
When '-2016280058' Then 'EULA not found Foreign Key Constraint'
When '-2016280059' Then 'Update Source not found Foreign Key Constraint'
When '-2016280060' Then 'CI Type not found Foreign Key Constraint'
When '-2016280061' Then 'Category not found Foreign Key Constraint'
When '-2016280062' Then 'Configuration Item not found Foreign Key Constraint'
When '-2016280063' Then 'Operation on Old Configuration Item when a newer instance exits in the Database'
When '-2016280319' Then 'Collection not found foriegn key constraint'
When '-2016280528' Then 'Error while creating inbox'
When '-2016280544' Then 'Thread is signaled to be stopped'
When '-2016280557' Then 'Registry write error'
When '-2016280558' Then 'Registry read error'
When '-2016280559' Then 'Registry connection error'
When '-2016280568' Then 'SQL send batch error'
When '-2016280569' Then 'SQL queue row error'
When '-2016280570' Then 'SQL table binding error'
When '-2016280571' Then 'SQL deadlock error'
When '-2016280572' Then 'SQL error while registering type'
When '-2016280573' Then 'SQl Error'
When '-2016280574' Then 'SQL connection error'
When '-2016280575' Then 'Invalid data'
When '-2016281107' Then 'Unsupported setting discovery source'
When '-2016281108' Then 'Referenced setting not found in CI'
When '-2016281109' Then 'Data type conversion failed'
When '-2016281110' Then 'Invalid parameter to CIM setting'
When '-2016281111' Then 'Not applicable for this device'
When '-2016281112' Then 'Remediation failed'
When '-2016341109' Then 'iOS device has returned an error'
When '-2016341110' Then 'iOS device has rejected the command due to incorrect format'
When '-2016341111' Then 'iOS device has returned an unexpected Idle status'
When '-2016341112' Then 'iOS device is currently busy'
When '-2016344008' Then '(1404): Certificate access denied'
When '-2016344009' Then '(1403): Certificate not found'
When '-2016344010' Then 'DCMO(1402): The Operation failed'
When '-2016344011' Then 'DCMO(1401): User chose not to accept the operation when prompted'
When '-2016344012' Then 'DCMO(1400): Client error'
When '-2016344108' Then 'DCMO(1204): Device Capability is disabled and User is allowed to re-enable it'
When '-2016344109' Then 'DCMO(1203): Device Capability is disabled and User is not allowed to re-enable it'
When '-2016344110' Then 'DCMO(1202): Enable operation is performed successfully but the Device Capability is currently detached'
When '-2016344111' Then 'DCMO(1201): Enable operation is performed successfully and the Device Capability is currently attached'
When '-2016344112' Then 'DCMO(1200): Operation is performed successfully'
When '-2016344197' Then 'Operation not implemented on client'
When '-2016344198' Then 'The package is an invalid upgrade'
When '-2016344199' Then 'Target location of package is not accessible'
When '-2016344200' Then 'Installer is busy doing some other operation'
When '-2016344201' Then 'Indicates that network failure aborted the operation'
When '-2016344202' Then 'The package has no rights to perform the operation'
When '-2016344203' Then 'Install/Uninstall Unknown error'
When '-2016344204' Then 'Mandatory file is in use and prevents the operation'
When '-2016344205' Then 'Package cannot be installed due to missing dependency'
When '-2016344206' Then 'Package cannot be installed due to security error'
When '-2016344207' Then 'Package validation failed.'
When '-2016344208' Then 'Installation of the package is not supported'
When '-2016344209' Then 'Insufficient free memory in the drive to perform the operation'
When '-2016344210' Then 'File is corrupted'
When '-2016344211' Then 'User cancelled the operation'
When '-2016344212' Then 'Application was successfully installed'
When '-2016344512' Then 'An invalid OMA download descriptor received'
When '-2016344593' Then 'Maximum number of http redirections has reached.'
When '-2016344594' Then 'Non-download specific error'
When '-2016344595' Then 'Internal error occurred. Most probably a programming error.'
When '-2016344596' Then 'Error occurred in the transaction'
When '-2016344597' Then 'General storage error'
When '-2016344598' Then 'Not enough disk space for the content'
When '-2016344599' Then 'Moving content file failed'
When '-2016344600' Then 'Invalid download drive'
When '-2016344601' Then 'File not found error'
When '-2016344602' Then 'File write failed'
When '-2016344603' Then 'Media where the download is being persisted, removed'
When '-2016344604' Then 'Download Manager cannot handle this URL'
When '-2016344605' Then 'Error in destination filename'
When '-2016344606' Then 'Destination file cannot be opened/created'
When '-2016344607' Then 'Unhandled HTTP error code'
When '-2016344608' Then '404: object not found'
When '-2016344609' Then '412: partial content cannot be downloaded'
When '-2016344610' Then 'Paused content is expired'
When '-2016344611' Then 'Resuming progressive download failed'
When '-2016344711' Then 'Connection failed. No network coverage'
When '-2016344713' Then 'Unknown error related to protocol'
When '-2016344810' Then 'Requested operation is invalid for this protocol'
When '-2016344811' Then 'Requested protocol is not known'
When '-2016344813' Then 'Unknown error related to remote content'
When '-2016344907' Then 'Content needed to resent but this failed'
When '-2016344908' Then 'Remote server required authentication but credentials supplied if any were not accepted'
When '-2016344909' Then 'Remote content was not found at the server'
When '-2016344910' Then 'Operation requested on remote content is not permitted'
When '-2016344911' Then 'Access to remote content denied'
When '-2016344913' Then 'Unknown proxy related error'
When '-2016345007' Then 'Proxy authentication required or proxy refused the supplied credentials if any'
When '-2016345008' Then 'Connection to the proxy timed out'
When '-2016345009' Then 'Invalid proxy host name'
When '-2016345010' Then 'Proxy server closed the connection prematurely'
When '-2016345011' Then 'Connection to proxy server was refused'
When '-2016345061' Then 'Detection rules not present'
When '-2016345063' Then 'Unknown network error'
When '-2016345103' Then 'Remote server unavailable'
When '-2016345104' Then 'Network authentication failed'
When '-2016345105' Then 'Temporary network failure'
When '-2016345106' Then 'Encrypted channel could not be established'
When '-2016345107' Then 'Operation was canceled before it was finished'
When '-2016345108' Then 'Connection to the remote server timed out'
When '-2016345109' Then 'Invalid host name'
When '-2016345110' Then 'Remote server closed the connection prematurely'
When '-2016345111' Then 'Remote server refused the connection'
When '-2016345112' Then 'Error Unknown'
When '-2016345595' Then 'Syncml: The response to an atomic command was too large to fit in a single message.'
When '-2016345596' Then 'Syncml: Command was inside Atomic element and Atomic failed. This command was not rolled back successfully.'
When '-2016345598' Then 'Syncml: The SyncML command was not completed successfully, since the operation was already cancelled before processing the command.'
When '-2016345599' Then 'Syncml: The recipient does not support or refuses to support the specified version of the SyncML Synchronization Protocol used in the request SyncML Message.'
When '-2016345600' Then 'Syncml: An application error occurred during the synchronization session.'
When '-2016345601' Then 'Syncml: A severe error occurred in the server while processing the request.'
When '-2016345602' Then 'Syncml: An error occurred while processing the request. The error is related to a failure in the recipient data store.'
When '-2016345603' Then 'Syncml: Reserved for future use.'
When '-2016345604' Then 'Syncml: An error occurred that necessitates a refresh of the current synchronization state of the client with the server.'
When '-2016345605' Then 'Syncml: The error caused all SyncML commands within an Atomic element type to fail.'
When '-2016345606' Then 'Syncml: An application error occurred while processing the request.'
When '-2016345607' Then 'Syncml: The recipient does not support or refuses to support the specified version of SyncML DTD used in the request SyncML Message.'
When '-2016345608' Then 'Syncml: The recipient, while acting as a gateway or proxy, did not receive a timely response from the upstream recipient specified by the URI (e.g. HTTP, FTP, LDAP) or some other auxiliary recipient (e.g. DNS) it needed to access in attempting to complete the request.'
When '-2016345609' Then 'Syncml: The recipient is currently unable to handle the request due to a temporary overloading or maintenance of the recipient.'
When '-2016345610' Then 'Syncml: The recipient, while acting as a gateway or proxy, received an invalid response from the upstream recipient it accessed in attempting to fulfill the request.'
When '-2016345611' Then 'Syncml: The recipient does not support the command required to fulfill the request.'
When '-2016345612' Then 'Syncml: The recipient encountered an unexpected condition which prevented it from fulfilling the request'
When '-2016345684' Then 'Syncml: Move failed'
When '-2016345685' Then 'Syncml: Parent cannot be deleted since it contains children.'
When '-2016345686' Then 'Syncml: Partial item not accepted.'
When '-2016345687' Then 'Syncml: The requested command failed because the sender does not have adequate access control permissions (ACL) on the recipient.'
When '-2016345688' Then 'Syncml: The chunked object was received, but the size of the received object did not match the size declared within the first chunk.'
When '-2016345689' Then 'Syncml: The requested command failed because the "Soft Deleted" item was previously "Hard Deleted" on the server.'
When '-2016345690' Then 'Syncml: The requested command failed on the server because the CGI scripting in the LocURI was incorrectly formed.'
When '-2016345691' Then 'Syncml: The requested command failed on the server because the specified search grammar was not known.'
When '-2016345692' Then 'Syncml: The recipient has no more storage space for the remaining synchronization data.'
When '-2016345693' Then 'Syncml: The client request created a conflict which was resolved by the server command winning.'
When '-2016345694' Then 'Syncml: The requested Put or Add command failed because the target already exists.'
When '-2016345695' Then 'Syncml: The request failed at this time and the originator should retry the request later.'
When '-2016345696' Then 'Syncml: The request failed because the specified byte size in the request was too big.'
When '-2016345697' Then 'Syncml: Unsupported media type or format.'
When '-2016345698' Then 'Syncml: The requested command failed because the target URI is too long for what the recipient is able or willing to process.'
When '-2016345699' Then 'Syncml: The recipient is refusing to perform the requested command because the requested item is larger than the recipient is able or willing to process.'
When '-2016345700' Then 'Syncml: The requested command failed on the recipient because it was incomplete or incorrectly formed.'
When '-2016345701' Then 'Syncml: The requested command must be accompanied by byte size or length information in the Meta element type.'
When '-2016345702' Then 'Syncml: The requested target is no longer on the recipient and no forwarding URI is known.'
When '-2016345703' Then 'Syncml: The requested failed because of an update conflict between the client and server versions of the data.'
When '-2016345704' Then 'Syncml: An expected message was not received within the required period of time.'
When '-2016345705' Then 'Syncml: The requested command failed because the originator must provide proper authentication.'
When '-2016345706' Then 'Syncml: The requested command failed because an optional feature in the request was not supported.'
When '-2016345707' Then 'Syncml: The requested command is not allowed on the target.'
When '-2016345708' Then 'Syncml: The requested target was not found.'
When '-2016345709' Then 'Syncml: The requested command failed, but the recipient understood the requested command.'
When '-2016345710' Then 'Syncml: The requested command failed because proper payment isneeded.'
When '-2016345711' Then 'Syncml: The requested command failed because the requestor must provide proper authentication.'
When '-2016345712' Then 'Syncml: The requested command could not be performed because of malformed syntax in the command.'
When '-2016345807' Then 'Syncml: The requested target must be accessed through the specified proxy URI.'
When '-2016345808' Then 'Syncml:The requested SyncML command was not executed on the target.'
When '-2016345809' Then 'Syncml: The requested target can be found at another URI.'
When '-2016345810' Then 'Syncml: The requested target has temporarily moved to a different URI.'
When '-2016345811' Then 'Syncml: The requested target has a new URI.'
When '-2016345812' Then 'Syncml: The requested target is one of a number of multiple alternatives requested target.'
When '-2016346011' Then 'Syncml: The specified SyncML command is being carried out, but has not yet completed.'
When '-2016403452' Then 'The software distribution policy was not found.'
When '-2016403454' Then 'The software distribution policy for this program was not found.'
When '-2016406894' Then 'The virtual application is in use'
When '-2016406895' Then 'The virtual environment is not applicable'
When '-2016406896' Then 'An error occurred when querying the App-V WMI provider'
When '-2016406897' Then 'The App-V sftmime command returned failure'
When '-2016406898' Then 'Could not uninstall the App-V deployment type because of conflict. The published components in this DT are still published by other DTs. This DT will be always detected as long as other DTs are still installed.'
When '-2016406900' Then 'Could not find streaming distribution point for the App-V package'
When '-2016406901' Then 'The App-V application is not installed'
When '-2016406902' Then 'The App-V client has reported a launch error'
When '-2016406906' Then 'The App-V package has already installed higher version by another deployment type so we cannot install a lower version of the package'
When '-2016406907' Then 'A dependent App-V package is not installed'
When '-2016406911' Then 'A supported App-V client is not installed'
When '-2016406912' Then 'Virtual application is currently in use'
When '-2016406959' Then 'The application deployment type handler could not be initialized. The deployment type might not be supported on this system.'
When '-2016406960' Then 'The computer restart cannot be initiated because a software installation job is in progress.'
When '-2016407024' Then 'Failed to get content locations.'
When '-2016407036' Then 'No distribution points were found for the requested content.'
When '-2016407037' Then 'The client cache is currently in use by a running program or by a download in progress.'
When '-2016407038' Then 'The content download cannot be performed because the total size of the client cache is smaller than the size of the requested content.'
When '-2016407039' Then 'The content download cannot be performed because there is not enough available space in cache or the disk is full.'
When '-2016407040' Then 'No content request found with the given handle.'
When '-2016407286' Then 'A fatal error occurred while preparing to execute the program, for example when creating the program execution environment, making a network connection, impersonating the user, determining the file association information, or when attempting to launch the program. This program execution will not be retried.'
When '-2016407287' Then 'Failed to verify that the given file is a valid installation package.'
When '-2016407288' Then 'Failed to access all the provided program locations. This program will not retry.'
When '-2016407289' Then 'Failed to access all the provided program locations. This program may retry if the maximum retry count has not been reached.'
When '-2016407290' Then 'Failed to verify the executable file is valid or to construct the associated command line.'
When '-2016407291' Then 'An error was encountered while getting the process information for the launched program and the program execution will not be monitored.'
When '-2016407292' Then 'The command line for this program is invalid.'
When '-2016407293' Then 'A non fatal error occurred while preparing to execute the program, for example when creating the program execution environment, making a network connection, impersonating the user, determining the file association information, or when attempting to launch the program. This program execution will be retried if the retry count has not been exceeded.'
When '-2016407294' Then 'An error occurred while creating the execution context.'
When '-2016407295' Then 'A fatal error has been encountered while attempting to run the program. The program execution will not be retried.'
When '-2016407296' Then 'A non fatal error has been encountered while attempting to run the program. The program execution will be retried if the retry count has not been exceeded.'
When '-2016407528' Then 'The program cannot run at this time because the client is on the internet.'
When '-2016407529' Then 'The content hash string or hash version are empty or incorrect in the software distribution policy or the hash verification failed.'
When '-2016407531' Then 'Failed to notify caller that software distribution is paused because the paused state or paused cookie do not match.'
When '-2016407532' Then 'The program cannot run because it is targeted to a user, requires user input or is set to run in user context.'
When '-2016407533' Then 'This program cannot run because it depends on another program that has not run successfully before.'
When '-2016407534' Then 'There is no program currently running.'
When '-2016407535' Then 'The execution request was not found.'
When '-2016407536' Then 'A system restart is in progress or there is a pending execution for this program which requires a computer restart.'
When '-2016407543' Then 'Failed to get data from WMI.'
When '-2016407544' Then 'Failed to indicate the client cache is currently in use.'
When '-2016407546' Then 'The requested program is not currently pending.'
When '-2016407547' Then 'The policy for this program does not exist or is invalid.'
When '-2016407548' Then 'The program is disabled.'
When '-2016407550' Then 'Another execution for this program is already pending.'
When '-2016407551' Then 'Another software execution is in progress or a restart is pending.'
When '-2016409588' Then 'No WDS session availiable.'
When '-2016409589' Then 'MCS Encountered WDS error.'
When '-2016409590' Then 'Invalid MCS configuration.'
When '-2016409591' Then 'Package is not multicast enabled.'
When '-2016409592' Then 'Package is not multicast shared.'
When '-2016409593' Then 'Invalid path specified for Package.'
When '-2016409594' Then 'MCS Server is Busy with many clients.'
When '-2016409595' Then 'MCS Encryption is empty'
When '-2016409596' Then 'Error performing MCS healthcheck'
When '-2016409597' Then 'Error opening MCS session'
When '-2016409598' Then 'MCS protocol version mismatch'
When '-2016409599' Then 'General MCS Failure'
When '-2016409600' Then 'Content transfer manager job is in an unexpected state'
When '-2016409835' Then 'No updates specified in requested job'
When '-2016409836' Then 'User based install not allowed as system restart is pending'
When '-2016409837' Then 'Software updates detection results not received yet'
When '-2016409838' Then 'A system restart is required to complete the installation'
When '-2016409839' Then 'Software updates deployment not active yet i.e., start time is in future'
When '-2016409840' Then 'Failed to compare process creation time'
When '-2016409841' Then 'Invalid updates installer path'
When '-2016409842' Then 'Empty command line specified'
When '-2016409843' Then 'Software update failed when attempted'
When '-2016409844' Then 'Software update execution timeout'
When '-2016409845' Then 'Failed to create process'
When '-2016409846' Then 'Invalid command line'
When '-2016409847' Then 'Failed to resume the monitoring of the process'
When '-2016409848' Then 'Software Updates Install not required'
When '-2016409849' Then 'Job Id mismatch'
When '-2016409850' Then 'No active job exists'
When '-2016409851' Then 'Pause state required'
When '-2016409852' Then 'Hard reboot is pending'
When '-2016409853' Then 'Another software updates install job is in progress. Only one job is allowed at a time.'
When '-2016409854' Then 'Assignment policy not found'
When '-2016409855' Then 'Software updates download not allowed at this time'
When '-2016409856' Then 'Software updates installation not allowed at this time'
When '-2016409959' Then 'Scan is already in progress'
When '-2016409960' Then 'Software update being attempted is not actionable'
When '-2016409961' Then 'Software update is already installed but just requires a reboot to complete the installation'
When '-2016409962' Then 'Software update is already installed'
When '-2016409963' Then 'Incomplete scan results'
When '-2016409964' Then 'WSUS source already exists'
When '-2016409965' Then 'Windows Updates Agent version too low'
When '-2016409966' Then 'Group policy conflict'
When '-2016409967' Then 'Software update source not found'
When '-2016409968' Then 'Software update is not applicable'
When '-2016409999' Then 'Waiting for third-party orchestration engine to initiate installation'
When '-2016410006' Then 'None of the child software updates of a bundle are applicable'
When '-2016410007' Then 'Not able to get software updates content locations at this time'
When '-2016410008' Then 'Software update still detected as actionable after apply'
When '-2016410009' Then 'No current or future service window exists to install software updates'
When '-2016410010' Then 'Software updates cannot be install outside service window'
When '-2016410011' Then 'No updates to process in the job'
When '-2016410012' Then 'Updates handler job was cancelled'
When '-2016410013' Then 'Failed to report installation status of software updates'
When '-2016410014' Then 'Failed to trigger installation of software updates'
When '-2016410015' Then 'Error while detecting updates status after installation success'
When '-2016410016' Then 'Unable to monitor a software update''s execution'
When '-2016410023' Then 'Error occurred reading policy for software update'
When '-2016410024' Then 'Software updates processing was cancelled'
When '-2016410025' Then 'Error while detecting software updates status after scan success'
When '-2016410026' Then 'Updates handler was unable to continue due to some generic internal error'
When '-2016410027' Then 'Failed to install one or more software updates'
When '-2016410028' Then 'Software update install failure occurred'
When '-2016410029' Then 'Software update download failure occurred'
When '-2016410030' Then 'Software update policy was not found'
When '-2016410031' Then 'Post install scan failed'
When '-2016410032' Then 'Pre install scan failed'
When '-2016410060' Then 'Legacy scanner not supported'
When '-2016410061' Then 'Offline scan is pending'
When '-2016410062' Then 'Online scan is pending'
When '-2016410063' Then 'Scan retry is pending'
When '-2016410064' Then 'Maximum retries exhausted'
When '-2016410071' Then 'Rescan of the updates is pending'
When '-2016410072' Then 'Invalid content location'
When '-2016410073' Then 'Process instance not found'
When '-2016410074' Then 'Invalid process instance information'
When '-2016410104' Then 'Invalid instance type'
When '-2016410105' Then 'Content not found'
When '-2016410106' Then 'Offline scan tool history not found'
When '-2016410107' Then 'Scan tool has been removed'
When '-2016410108' Then 'The ScanTool not found in job queue'
When '-2016410109' Then 'The ScanTool policy has been removed so cannot complete scan operation'
When '-2016410110' Then 'Content location request timeout occurred'
When '-2016410111' Then 'Scanning for updates timed out'
When '-2016410112' Then 'Scan Tool Policy not found'
When '-2016410558' Then 'An enforcement action (install/uninstall) was attempted for a simulated deployment.'
When '-2016410559' Then 'The deployment metadata is not available on the client.'
When '-2016410560' Then 'Expected policy documents are incomplete or missing.'
When '-2016410592' Then 'The detection rules refer to an unsupported WMI namespace.'
When '-2016410621' Then 'The detection rules contain an unsupported datatype.'
When '-2016410622' Then 'The detection rules contain an invalid operator.'
When '-2016410623' Then 'An incorrect XML expression was found when evaluating the detection rules.'
When '-2016410624' Then 'An unexpected error occurred when evaluating the detection rules.'
When '-2016410832' Then 'This application deployment type does not support being enforced with a required deployment'
When '-2016410838' Then 'The uninstall command line is invalid'
When '-2016410839' Then 'Application requirement evaluation or detection failed'
When '-2016410840' Then 'Configuration item digest not found'
When '-2016410841' Then 'Script is not signed'
When '-2016410842' Then 'The application deployment metadata was not found in WMI'
When '-2016410843' Then 'Application was still detected after uninstall completed.'
When '-2016410844' Then 'The application was not detected after installation completed.'
When '-2016410845' Then 'No user is logged on.'
When '-2016410846' Then 'Rule conflict.'
When '-2016410847' Then 'The script execution has timed out.'
When '-2016410848' Then 'The script host has not been installed yet.'
When '-2016410849' Then 'Script for discovery returned invalid data.'
When '-2016410850' Then 'Unsupported configuration. The application is configured to Install for User but has been targeted to a machine device instead of the user.'
When '-2016410851' Then 'Unsupported configuration. The application is targeted to a user, but is configured to install when no user is logged in.'
When '-2016410858' Then 'CI Agent job was canceled.'
When '-2016410859' Then 'The CI version info data is not available.'
When '-2016410860' Then 'CI Version Info timed out.'
When '-2016410983' Then 'The client does not recognize this type of signature'
When '-2016410984' Then 'The client''s database record could not be validated'
When '-2016410985' Then 'Invalid key'
When '-2016410986' Then 'The client failed to process one or more CI documents'
When '-2016410987' Then 'Registration certificate is either missing or invalid'
When '-2016410988' Then 'Unable to verify Policy'
When '-2016410989' Then 'Client unable to Refresh Site server signing certificate'
When '-2016410990' Then 'Client unable to compute message signature for InBand Auth'
When '-2016410991' Then 'No task sequence policies assigned'
When '-2016410992' Then 'Job contains no items'
When '-2016410999' Then 'Failed to decompress CI documents'
When '-2016411000' Then 'Failed to decompress configuration item'
When '-2016411001' Then 'Signing certificate is missing'
When '-2016411002' Then 'Invalid SMS authority'
When '-2016411003' Then 'Search criteria verb is either missing or invalid'
When '-2016411004' Then 'Missing subject name'
When '-2016411005' Then 'Missing private key'
When '-2016411006' Then 'More than one certificate found but ''select first cert'' was not set'
When '-2016411007' Then 'No certificate matching criteria specified'
When '-2016411008' Then 'Empty certificate store'
When '-2016411009' Then 'SHA could not bind as NAP Agent might not be running'
When '-2016411010' Then 'Bad HTTP status code'
When '-2016411011' Then 'CI documents download failed due to hash mismatch'
When '-2016411012' Then 'CI documents download timed out'
When '-2016411013' Then 'General CI documents download failure'
When '-2016411014' Then 'Configuration item download failed due to hash mismatch'
When '-2016411015' Then 'Configuration item download timed out'
When '-2016411016' Then 'General configuration item download failure'
When '-2016411017' Then 'Insufficient resources to complete the operation'
When '-2016411018' Then 'System restart is required'
When '-2016411019' Then 'Failed to acquire lock'
When '-2016411020' Then 'No callback completion interface specified'
When '-2016411021' Then 'Component has already been requested to pause'
When '-2016411022' Then 'Component is disabled'
When '-2016411023' Then 'Component is paused'
When '-2016411024' Then 'Component is not paused'
When '-2016411025' Then 'Pause cookie did not match'
When '-2016411026' Then 'Pause duration too big'
When '-2016411027' Then 'Pause duration too small'
When '-2016411028' Then 'Status not found'
When '-2016411029' Then 'Agent type not found'
When '-2016411030' Then 'Key type not found'
When '-2016411031' Then 'Required management point not found'
When '-2016411032' Then 'Compilation failed'
When '-2016411033' Then 'Download failed'
When '-2016411034' Then 'Inconsistent data'
When '-2016411035' Then 'Invalid store state'
When '-2016411036' Then 'Invalid operation'
When '-2016411037' Then 'Invalid message received from DTS'
When '-2016411038' Then 'The type of DTS message received is unknown'
When '-2016411039' Then 'Failed to persist configuration item definition'
When '-2016411040' Then 'Job state is not valid for the action being requested'
When '-2016411041' Then 'Client disconnected'
When '-2016411042' Then 'Encountered a message which was not sufficiently trusted to forward to an endpoint for processing'
When '-2016411043' Then 'Encountered invalid XML document which could not be validated by its corresponding XML schema(s)'
When '-2016411060' Then 'Encountered invalid XML schema document'
When '-2016411061' Then 'Name already exists'
When '-2016411062' Then 'The job is already connected'
When '-2016411063' Then 'Property is not valid for the given configuration item type'
When '-2016411064' Then 'There was an error in network communication'
When '-2016411065' Then 'A component required to perform the operation was missing or not registered'
When '-2016411066' Then 'There was an error evaluating the health of the client'
When '-2016411067' Then 'The object or subsystem has already been initialized'
When '-2016411068' Then 'The object or subsystem has not been initialized'
When '-2016411069' Then 'Public key mismatch'
When '-2016411070' Then 'Stored procedure failed'
When '-2016411071' Then 'Failed to connect to database'
When '-2016411072' Then 'Insufficient disk space'
When '-2016411079' Then 'Client id not found'
When '-2016411080' Then 'Public key not found'
When '-2016411081' Then 'Reply mode incompatible'
When '-2016411082' Then 'Low memory'
When '-2016411083' Then 'Syntax error occurred while parsing'
When '-2016411084' Then 'Internal endpoint cannot receive a remote message'
When '-2016411085' Then 'Message not trusted'
When '-2016411086' Then 'Message not signed'
When '-2016411087' Then 'Transient error'
When '-2016411088' Then 'Error logging on as given credentials'
When '-2016411095' Then 'Failed to get credentials'
When '-2016411096' Then 'Invalid endpoint'
When '-2016411097' Then 'Functionality disabled'
When '-2016411098' Then 'Invalid protocol'
When '-2016411099' Then 'Invalid address type'
When '-2016411100' Then 'Invalid message'
When '-2016411101' Then 'Version mismatch'
When '-2016411102' Then 'Operation cancelled'
When '-2016411103' Then 'Invalid user'
When '-2016411104' Then 'Invalid type'
When '-2016411111' Then 'Global service not set'
When '-2016411112' Then 'Invalid service settings'
When '-2016411113' Then 'Data is corrupt'
When '-2016411114' Then 'Invalid service parameter'
When '-2016411115' Then 'Item not found'
When '-2016411116' Then 'Invalid name length'
When '-2016411117' Then 'Timeout occurred'
When '-2016411118' Then 'Context is closed'
When '-2016411119' Then 'Invalid Address'
When '-2016411120' Then 'Invalid Translator'
When '-2016411127' Then 'Data type mismatch'
When '-2016411128' Then 'Invalid command'
When '-2016411129' Then 'Parsing error'
When '-2016411130' Then 'Invalid file'
When '-2016411131' Then 'Invalid path'
When '-2016411132' Then 'Data too large'
When '-2016411133' Then 'No data supplied'
When '-2016411134' Then 'Service is shutting down'
When '-2016411135' Then 'Incorrect name format'
When '-2016411136' Then 'Name not found'
When '-2145058817' Then 'There was a reporter error not covered by another error code.'
When '-2145062907' Then 'The specified callback cookie is not found.'
When '-2145062908' Then 'The server rejected an event because the server was too busy.'
When '-2145062909' Then 'The XML in the event namespace descriptor could not be parsed.'
When '-2145062910' Then 'The XML in the event namespace descriptor could not be parsed.'
When '-2145062911' Then 'The event cache file was defective.'
When '-2145062913' Then 'There was an expression evaluator error not covered by another WU_E_EE_* error code.'
When '-2145067001' Then 'An expression evaluator operation could not be completed because the cluster state of the computer could not be determined.'
When '-2145067002' Then 'An expression evaluator operation could not be completed because there was an invalid attribute.'
When '-2145067003' Then 'The expression evaluator could not be initialized.'
When '-2145067004' Then 'An expression evaluator operation could not be completed because the version of the serialized expression data is invalid.'
When '-2145067005' Then 'An expression evaluator operation could not be completed because an expression contains an incorrect number of metadata nodes.'
When '-2145067006' Then 'An expression evaluator operation could not be completed because an expression was invalid.'
When '-2145067007' Then 'An expression evaluator operation could not be completed because an expression was unrecognized.'
When '-2145067009' Then 'Windows Update Agent could not be updated because of an error not covered by another WU_E_SETUP_* error code.'
When '-2145071082' Then 'Windows Update Agent could not be updated because of an unknown error.'
When '-2145071083' Then 'Windows Update Agent is successfully updated, but a reboot is required to complete the setup.'
When '-2145071084' Then 'Windows Update Agent is successfully updated, but a reboot is required to complete the setup.'
When '-2145071085' Then 'Windows Update Agent could not be updated because the server does not contain update information for this version.'
When '-2145071086' Then 'Windows Update Agent must be updated before search can continue. An administrator is required to perform the operation.'
When '-2145071087' Then 'Windows Update Agent must be updated before search can continue.'
When '-2145071088' Then 'Windows Update Agent could not be updated because the registry contains invalid information.'
When '-2145071089' Then 'Windows Update Agent could not be updated because the setup handler failed during execution.'
When '-2145071090' Then 'Windows Update Agent setup package requires a reboot to complete installation.'
When '-2145071091' Then 'Windows Update Agent setup is already running.'
When '-2145071092' Then 'Windows Update Agent could not be updated because a restart of the system is required.'
When '-2145071093' Then 'Windows Update Agent could not be updated because the system is configured to block the update.'
When '-2145071094' Then 'Windows Update Agent could not be updated because the current system configuration is not supported.'
When '-2145071095' Then 'An update to the Windows Update Agent was skipped due to a directive in the wuident.cab file.'
When '-2145071096' Then 'An update to the Windows Update Agent was skipped because previous attempts to update have failed.'
When '-2145071097' Then 'Windows Update Agent could not be updated because regsvr32.exe returned an error.'
When '-2145071098' Then 'Windows Update Agent could not be updated because a WUA file on the target system is newer than the corresponding source file.'
When '-2145071099' Then 'Windows Update Agent could not be updated because the versions specified in the INF do not match the actual source file versions.'
When '-2145071100' Then 'Windows Update Agent could not be updated because setup initialization never completed successfully.'
When '-2145071101' Then 'Windows Update Agent could not be updated because of an internal error that caused setup initialization to be performed twice.'
When '-2145071102' Then 'Windows Update Agent could not be updated because the wuident.cab file contains invalid information.'
When '-2145071103' Then 'Windows Update Agent could not be updated because an INF file contains invalid information.'
When '-2145071105' Then 'A driver error not covered by another WU_E_DRV_* code.'
When '-2145075193' Then 'Information required for the synchronization of applicable printers is missing.'
When '-2145075194' Then 'Driver synchronization failed.'
When '-2145075195' Then 'The driver update is missing a required attribute.'
When '-2145075196' Then 'The driver update is missing metadata.'
When '-2145075197' Then 'The registry type read for the driver does not match the expected type.'
When '-2145075198' Then 'A property for the driver could not be found. It may not conform with required specifications.'
When '-2145075199' Then 'A driver was skipped.'
When '-2145079291' Then 'Cannot cancel a non-scheduled install.'
When '-2145079292' Then 'The task was stopped and needs to be run again to complete.'
When '-2145079293' Then 'The operation cannot be completed since the task is not yet started.'
When '-2145079294' Then 'The operation cannot be completed since the task status is currently disabled.'
When '-2145079295' Then 'The task is currently in progress.'
When '-2145079297' Then 'An Automatic Updates error not covered by another WU_E_AU * code.'
When '-2145083386' Then 'The default service registered with AU changed during the search.'
When '-2145083387' Then 'No unmanaged service is registered with AU.'
When '-2145083388' Then 'Automatic Updates was unable to process incoming requests because it was paused.'
When '-2145083389' Then 'The old version of the Automatic Updates client was disabled.'
When '-2145083390' Then 'The old version of the Automatic Updates client has stopped because the WSUS server has been upgraded.'
When '-2145083392' Then 'Automatic Updates was unable to service incoming requests.'
When '-2145087483' Then 'A WMI error occurred when enumerating the instances for a particular class.'
When '-2145087484' Then 'There was an inventory error not covered by another error code.'
When '-2145087485' Then 'Failed to upload inventory result to the server.'
When '-2145087486' Then 'Failed to get the requested inventory type from the server.'
When '-2145087487' Then 'Parsing of the rule file failed.'
When '-2145087489' Then 'A data store error not covered by another WU_E_DS_* code.'
When '-2145091555' Then 'A data store operation did not complete because it was requested with an impersonated identity.'
When '-2145091556' Then 'The data store requires a session reset; release the session and retry with a new session.'
When '-2145091557' Then 'The schema of the current data store and the schema of a table in a backup XML document do not match.'
When '-2145091558' Then 'A request was declined because the operation is not allowed.'
When '-2145091559' Then 'A request to remove the Windows Update service or to unregister it with Automatic Updates was declined because it is a built-in service and/or Automatic Updates cannot fall back to another service.'
When '-2145091560' Then 'A table was not closed because it is not associated with the session.'
When '-2145091561' Then 'A table was not closed because it is not associated with the session.'
When '-2145091562' Then 'A request to hide an update was declined because it is a mandatory update or because it was deployed with a deadline.'
When '-2145091563' Then 'An operation did not complete because the registration of the service has expired.'
When '-2145091564' Then 'An operation did not complete because the service is not in the data store.'
When '-2145091565' Then 'The server sent the same update to the client with two different revision IDs.'
When '-2145091567' Then 'Could not create a data store object in another process.'
When '-2145091568' Then 'The data store is not allowed to be registered with COM in the current process.'
When '-2145091569' Then 'The data store could not be initialized because it was locked by another process.'
When '-2145091570' Then 'The row was not added because an existing row has the same primary key.'
When '-2145091571' Then 'The category was not added because it contains no parent categories and is not a top-level category itself.'
When '-2145091572' Then 'The data store section could not be locked within the allotted time.'
When '-2145091573' Then 'The update was not deleted because it is still referenced by one or more services.'
When '-2145091574' Then 'The update was not processed because its update handler could not be recognized.'
When '-2145091575' Then 'The data store is missing required information or has a reference to missing license terms, file, localized property or linked row.'
When '-2145091576' Then 'The data store is missing required information or has a NULL in a table column that requires a non-null value.'
When '-2145091577' Then 'The information requested is not in the data store.'
When '-2145091578' Then 'The current and expected versions of the data store do not match.'
When '-2145091579' Then 'A table could not be opened because the table is not in the data store.'
When '-2145091580' Then 'The data store contains a table with unexpected columns.'
When '-2145091581' Then 'The data store is missing a table.'
When '-2145091582' Then 'The current and expected states of the data store do not match.'
When '-2145091583' Then 'An operation failed because the data store was in use.'
When '-2145091584' Then 'An operation failed because Windows Update Agent is shutting down.'
When '-2145091585' Then 'Search using the scan package failed.'
When '-2145095675' Then 'The service is not registered.'
When '-2145095676' Then 'The size of the event payload submitted is invalid.'
When '-2145095677' Then 'An invalid event payload was specified.'
When '-2145095678' Then 'An operation could not be completed because the scan package requires a greater version of the Windows Update Agent.'
When '-2145095679' Then 'An operation could not be completed because the scan package was invalid.'
When '-2145095681' Then 'There was a download manager error not covered by another WU_E_DM_* error code.'
When '-2145099764' Then 'A download failed because the current network limits downloads by update size for the update service.'
When '-2145099765' Then 'A download must be restarted because the update content changed in a new revision.'
When '-2145099766' Then 'A download must be restarted because the location of the source of the download has changed.'
When '-2145099767' Then 'A download manager operation failed because there was an unspecified Background Intelligent Transfer Service (BITS) transfer error.'
When '-2145099768' Then 'A download manager operation failed because the download manager was unable to connect the Background Intelligent Transfer Service (BITS).'
When '-2145099769' Then 'The update has not been downloaded.'
When '-2145099770' Then 'A download manager operation could not be completed because the version of Background Intelligent Transfer Service (BITS) is incompatible.'
When '-2145099771' Then 'A download manager operation could not be completed because the network connection was unavailable.'
When '-2145099772' Then 'An operation could not be completed because a download request is required from the download handler.'
When '-2145099773' Then 'A download manager operation could not be completed because the file metadata requested an unrecognized hash algorithm.'
When '-2145099774' Then 'A download manager operation could not be completed because the file digest was not recognized.'
When '-2145099775' Then 'A download manager operation could not be completed because the requested file does not have a URL.'
When '-2145099777' Then 'The redirector failed for reasons not covered by another WU_E_REDIRECTOR_* error code.'
When '-2145103826' Then 'A redirector recovery action did not complete because the server is managed.'
When '-2145103827' Then 'Windows Update Agent failed to download a redirector cabinet file with a new redirectorId value from the server during the recovery.'
When '-2145103869' Then 'The redirectorId in the downloaded redirector cab is less than in the cached cab.'
When '-2145103870' Then 'The redirector XML document is missing some required information.'
When '-2145103871' Then 'The redirector XML document could not be loaded into the DOM class.'
When '-2145103873' Then 'A communication error not covered by another WU_E_PT_* error code.'
When '-2145107915' Then 'External cab processor was unable to get file locations.'
When '-2145107916' Then 'An external cab file could not be decompressed.'
When '-2145107917' Then 'The file digest could not be extracted from an external cab file.'
When '-2145107918' Then 'External cab processor found invalid metadata.'
When '-2145107919' Then 'The format of a metadata file was invalid.'
When '-2145107920' Then 'The external cab processor initialization did not complete.'
When '-2145107921' Then 'External cab file processing completed with some errors.'
When '-2145107924' Then 'Same as ERROR_WINHTTP_NAME_NOT_RESOLVED - the proxy server or target server name cannot be resolved.'
When '-2145107925' Then 'The HTTP request could not be completed and the reason did not correspond to any of the WU_E_PT_HTTP_* error codes.'
When '-2145107926' Then 'A configuration property value was missing.'
When '-2145107927' Then 'A configuration property value was wrong.'
When '-2145107928' Then 'Windows Update Agent was unable to create any valid authentication cookies.'
When '-2145107929' Then 'The server returned an empty authentication information list.'
When '-2145107930' Then 'Operation failed because Windows Update Agent does not support registration with a non-WSUS server.'
When '-2145107931' Then 'Operation failed due to a changed file location; refresh internal state and resend.'
When '-2145107932' Then 'Same as HTTP status 505 - the server does not support the HTTP protocol version used for the request.'
When '-2145107933' Then 'Same as HTTP status 503 - the request was timed out waiting for a gateway.'
When '-2145107934' Then 'Same as HTTP status 503 - the service is temporarily overloaded.'
When '-2145107935' Then 'Same as HTTP status 502 - the server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request.'
When '-2145107936' Then 'Same as HTTP status 500 - server does not support the functionality required to fulfill the request.'
When '-2145107937' Then 'Same as HTTP status 500 - an error internal to the server prevented fulfilling the request.'
When '-2145107938' Then 'Same as HTTP status 410 - requested resource is no longer available at the server.'
When '-2145107939' Then 'Same as HTTP status 409 - the request was not completed due to a conflict with the current state of the resource.'
When '-2145107940' Then 'Same as HTTP status 408 - the server timed out waiting for the request.'
When '-2145107941' Then 'Same as HTTP status 407 - proxy authentication is required.'
When '-2145107942' Then 'Same as HTTP status 405 - the HTTP method is not allowed.'
When '-2145107943' Then 'Same as HTTP status 404 - the server cannot find the requested URI (Uniform Resource Identifier).'
When '-2145107944' Then 'Same as HTTP status 403 - server understood the request, but declined to fulfill it.'
When '-2145107945' Then 'Same as HTTP status 401 - the requested resource requires user authentication.'
When '-2145107946' Then 'Same as HTTP status 400 - the server could not process the request due to invalid syntax.'
When '-2145107947' Then 'The reply from the server indicates that the server was changed or the cookie was invalid; refresh the state of the internal cache and retry.'
When '-2145107948' Then 'Cannot determine computer LSID.'
When '-2145107949' Then 'The computer name could not be determined.'
When '-2145107950' Then 'Initialization failed because the object was already initialized.'
When '-2145107951' Then 'WUServer policy value is missing in the registry.'
When '-2145107952' Then 'The number of round trips to the server exceeded the maximum limit.'
When '-2145107953' Then 'There was an unspecified Windows Management Instrumentation (WMI) error.'
When '-2145107954' Then 'Same as SOAP_E_SERVER - The SOAP message could not be processed due to a server error; resend later.'
When '-2145107955' Then 'Same as SOAP_E_CLIENT - SOAP client found the message was malformed; fix before resending.'
When '-2145107956' Then 'Same as SOAP_E_MUST_UNDERSTAND - SOAP client was unable to understand a header.'
When '-2145107957' Then 'Same as SOAP_E_VERSION_MISMATCH - SOAP client found an unrecognizable namespace for the SOAP envelope.'
When '-2145107958' Then 'Same as SOAPCLIENT_PARSE_ERROR - SOAP client failed to parse the response from the server.'
When '-2145107959' Then 'Same as SOAPCLIENT_READ_ERROR - SOAP client failed while reading the response from the server.'
When '-2145107960' Then 'Same as SOAPCLIENT_PARSEFAULT_ERROR - SOAP client failed to parse a SOAP fault.'
When '-2145107961' Then 'Same as SOAPCLIENT_SOAPFAULT - SOAP client failed because there was a SOAP fault for reasons of WU_E_PT_SOAP_* error codes.'
When '-2145107962' Then 'Same as SOAPCLIENT_SERVER_ERROR - SOAP client failed because there was a server error.'
When '-2145107963' Then 'Same as SOAPCLIENT_SEND_ERROR - SOAP client failed to send a message for reasons of WU_E_WINHTTP_* error codes.'
When '-2145107964' Then 'Same as SOAPCLIENT_CONNECT_ERROR - SOAP client failed to connect to the server.'
When '-2145107965' Then 'Same as SOAPCLIENT_GENERATE_ERROR - SOAP client failed to generate the request.'
When '-2145107966' Then 'Same as SOAPCLIENT_OUTOFMEMORY - SOAP client failed because it ran out of memory.'
When '-2145107967' Then 'Same as SOAPCLIENT_INITIALIZE_ERROR - initialization of the SOAP client failed, possibly because of an MSXML installation failure.'
When '-2145107968' Then 'WU_E_PT_SOAPCLIENT_* error codes map to the SOAPCLIENT_ERROR enum of the ATL Server Library.'
When '-2145107969' Then 'There was a user interface error not covered by another WU_E_AUCLIENT_* error code.'
When '-2145107970' Then 'Unsupported version of WU client UI exported functions.'
When '-2145107971' Then 'Unable to show UI when in non-UI mode; WU client UI modules may not be installed.'
When '-2145112060' Then 'A failure occurred when trying to create an icon in the taskbar notification area.'
When '-2145112061' Then 'The results of download and installation are not available; the operation may have failed to start.'
When '-2145112062' Then 'The results of download and installation could not be read from the registry due to an invalid data format.'
When '-2145112063' Then 'The results of download and installation could not be read from the registry due to an unrecognized data format version.'
When '-2145112065' Then 'An update handler error not covered by another WU_E_UH_* code.'
When '-2145116133' Then 'The targeted session for isntall is invalid.'
When '-2145116134' Then 'The installer does not support the installation configuration.'
When '-2145116135' Then 'The custom installer signature did not match the signature required by the update.'
When '-2145116136' Then 'A callback installer called back with an error.'
When '-2145116137' Then 'The OS servicing stack must be updated before this update is downloaded or installed.'
When '-2145116138' Then 'The state of the update after its post-reboot operation has completed is unexpected.'
When '-2145116139' Then 'The result of the post-reboot operation for the update could not be determined.'
When '-2145116140' Then 'The post-reboot operation for the update is still in progress.'
When '-2145116141' Then 'The update metadata contains an invalid CBS package identifier.'
When '-2145116142' Then 'The update handler has received an unexpected response from CBS.'
When '-2145116143' Then 'The update handler has exceeded the maximum number of download requests.'
When '-2145116144' Then 'The update handler failed to fall back to the self-contained content.'
When '-2145116145' Then 'The file names contained in the update metadata and in the update package are inconsistent.'
When '-2145116146' Then 'The update handler failed to send notification of the status of the install (uninstall) operation.'
When '-2145116147' Then 'The update handler did not install the update because it needs to be downloaded again.'
When '-2145116148' Then 'The update handler should download self-contained content rather than delta-compressed content for the update.'
When '-2145116149' Then 'The installer failed to install (uninstall) one or more updates.'
When '-2145116150' Then 'A request to the handler to install an update could not be completed because the update requires user input.'
When '-2145116151' Then 'An operation could not be completed because the handler-specific metadata is invalid.'
When '-2145116152' Then 'An operation being done by the update handler was cancelled.'
When '-2145116153' Then 'An operation could not be completed because the installer exceeded the time limit.'
When '-2145116154' Then 'A handler operation could not be completed because the update contains invalid metadata.'
When '-2145116155' Then 'An operation did not complete because the wrong handler was specified.'
When '-2145116156' Then 'A request for the handler to install (uninstall) an update could not be completed because the update does not support install (uninstall).'
When '-2145116157' Then 'A remote update handler could not be created because one already exists.'
When '-2145116158' Then 'A request for an update handler could not be completed because the handler could not be recognized.'
When '-2145116159' Then 'A request for a remote update handler could not be completed because the handler is local only.'
When '-2145116160' Then 'A request for a remote update handler could not be completed because no remote process is available.'
When '-2145116161' Then 'Search may have missed some updates because there was a failure of the Windows Installer.'
When '-2145120252' Then 'An update could not be applied because the application is installed per-user.'
When '-2145120253' Then 'Search may have missed some updates because policy has disabled Windows Installer patching.'
When '-2145120254' Then 'Search may have missed some updates because the Windows Installer is not configured.'
When '-2145120255' Then 'Search may have missed some updates because the Windows Installer is less than version 3.1.'
When '-2145120257' Then 'An operation failed due to reasons not covered by another error code.'
When '-2145123263' Then 'The operation is invalid because protocol talker is in an inappropriate state.'
When '-2145123264' Then 'The connection to the service endpoint died.'
When '-2145123265' Then 'A URL for the requested service endpoint is not available.'
When '-2145123266' Then 'The endpoint provider plugin requires online refresh.'
When '-2145123267' Then 'The requested service property is not available.'
When '-2145123268' Then 'The proxy auth scheme is not supported.'
When '-2145123269' Then 'Unable to load NWS runtime.'
When '-2145123270' Then 'The url is invalid.'
When '-2145123271' Then 'The data received does not meet the data contract expectations.'
When '-2145123272' Then 'There is no route or network connectivity to the endpoint.'
When '-2145123273' Then 'There was a problem authorizing with the service.'
When '-2145123274' Then 'The server does not support category-specific search; Full catalog search has to be issued instead.'
When '-2145124278' Then 'Windows Update agent operations are not available while OS setup is running.'
When '-2145124279' Then 'The data is out of range.'
When '-2145124280' Then 'The featured update notification info returned by the server is invalid.'
When '-2145124281' Then 'The operation requested is not supported.'
When '-2145124282' Then 'The URL does not point to a file.'
When '-2145124283' Then 'A search was attempted with a scope that is not currently supported for this type of search.'
When '-2145124284' Then 'Only administrators can perform this operation on per-machine updates.'
When '-2145124285' Then 'There is no support for WUA UI.'
When '-2145124286' Then 'The update service is no longer registered with AU.'
When '-2145124287' Then 'Service is not available while sysprep is running.'
When '-2145124288' Then 'WUA API method does not run on Server Core installation.'
When '-2145124295' Then 'Agent is asked by server to resync too many times.'
When '-2145124296' Then 'The downloaded file has an unexpected content type.'
When '-2145124297' Then 'The functionality for the operation is not supported.'
When '-2145124298' Then 'The object''s current state did not allow the operation.'
When '-2145124299' Then 'The update was not processed.'
When '-2145124300' Then 'Update failed to download.'
When '-2145124301' Then 'License terms could not be downloaded.'
When '-2145124302' Then 'The search criteria string was invalid.'
When '-2145124303' Then 'The file is in the wrong format.'
When '-2145124304' Then 'The format of the proxy list was invalid.'
When '-2145124305' Then 'Operation did not complete because the DisableWindowsUpdateAccess policy was set.'
When '-2145124306' Then 'Access to an unmanaged server is not allowed.'
When '-2145124307' Then 'A full-file update could not be installed because it required the source.'
When '-2145124308' Then 'A delta-compressed update could not be installed because it required the source.'
When '-2145124309' Then 'An operation did not complete because it requires a newer version of server.'
When '-2145124310' Then 'A component required to detect applicable updates was missing.'
When '-2145124311' Then 'Search may have missed some updates before there is an unlicensed application on the system.'
When '-2145124312' Then 'The update could not be uninstalled because the request did not originate from a WSUS server.'
When '-2145124313' Then 'The URL exceeded the maximum length.'
When '-2145124314' Then 'The type of update is invalid.'
When '-2145124315' Then 'Group Policy settings prevented access to Windows Update.'
When '-2145124316' Then 'There are no updates.'
When '-2145124317' Then 'The license terms for all updates were declined.'
When '-2145124318' Then 'Operation failed for all the updates.'
When '-2145124319' Then 'Operation did not complete because it timed out.'
When '-2145124320' Then 'Operation did not complete because there is no logged-on interactive user.'
When '-2145124321' Then 'Operation did not complete because the network connection was unavailable.'
When '-2145124322' Then 'Operation did not complete because the service or system was being shut down.'
When '-2145124323' Then 'An update contains invalid metadata.'
When '-2145124325' Then 'The operation could not be performed because the Windows Update Agent is self-updating.'
When '-2145124326' Then 'A policy value was not set.'
When '-2145124327' Then 'An exclusive update cannot be installed with other updates at the same time.'
When '-2145124328' Then 'Operation failed because a required user token is missing.'
When '-2145124329' Then 'Operation was not performed because there are no applicable updates.'
When '-2145124330' Then 'Operation tried to install while another installation was in progress or the system was pending a mandatory restart.'
When '-2145124332' Then 'Updates requested for install are not installable by caller.'
When '-2145124333' Then 'Operation tried to add a duplicate item to a list.'
When '-2145124334' Then 'An invalid registry value was read.'
When '-2145124335' Then 'An invalid update relationship was detected.'
When '-2145124336' Then 'Update relationships too deep to evaluate were evaluated.'
When '-2145124337' Then 'Circular update relationships were detected in the metadata.'
When '-2145124338' Then 'Windows Update Agent found invalid information in the update''s XML data.'
When '-2145124339' Then 'Windows Update Agent could not find required information in the update''s XML data.'
When '-2145124340' Then 'No operation was required.'
When '-2145124341' Then 'Operation was cancelled.'
When '-2145124342' Then 'Cancellation of the operation was not allowed.'
When '-2145124343' Then 'Another conflicting operation was in progress. Some operations such as installation cannot be performed twice simultaneously.'
When '-2145124344' Then 'The key for the item queried could not be found.'
When '-2145124345' Then 'The index to a collection was invalid.'
When '-2145124346' Then 'The requested number of byte ranges exceeds the maximum number (2^31 - 1).'
When '-2145124347' Then 'The update handler requested a byte range overlapping a previously requested range.'
When '-2145124348' Then 'The object could not be initialized.'
When '-2145124349' Then 'An ID cannot be found.'
When '-2145124350' Then 'The maximum capacity of the service was exceeded.'
When '-2145124351' Then 'Windows Update Agent was unable to provide the service.'
When '-2146232576' Then 'Common Language Runtime (CLR), and the necessary version of the CLR cannot be loaded'
When '-2146893558' Then 'A fatal error occurred while preparing to execute the program, for example when creating the program execution environment, making a network connection, impersonating the user, determining the file association information, or when attempting to launch the program. This program execution will not be retried.'
When '-2146893559' Then 'Failed to verify that the given file is a valid installation package.'
When '-2146893560' Then 'Failed to access all the provided program locations. This program will not retry.'
When '-2146893562' Then 'Failed to verify the executable file is valid or to construct the associated command line.'
When '-2146893564' Then 'The command line for this program is invalid.'
When '-2146893566' Then 'An error occurred while creating the execution context.'
When '-2146893567' Then 'A fatal error has been encountered while attempting to run the program. The program execution will not be retried.'
When '-2146958768' Then 'The computer restart cannot be initiated because a software installation job is in progress.'
When '-2146958832' Then 'Failed to get content locations.'
When '-2146958844' Then 'No distribution points were found for the requested content.'
When '-2146958845' Then 'The client cache is currently in use by a running program or by a download in progress.'
When '-2146958846' Then 'The content download cannot be performed because the total size of the client cache is smaller than the size of the requested content.'
When '-2146958847' Then 'The content download cannot be performed because there is not enough available space in cache or the disk is full.'
When '-2146958848' Then 'No content request found with the given handle.'
When '-2146959097' Then 'Failed to access all the provided program locations. This program may retry if the maximum retry count has not been reached.'
When '-2146959099' Then 'An error was encountered while getting the process information for the launched program and the program execution will not be monitored.'
When '-2146959101' Then 'A non fatal error occurred while preparing to execute the program, for example when creating the program execution environment, making a network connection, impersonating the user, determining the file association information, or when attempting to launch the program. This program execution will be retried if the retry count has not been exceeded.'
When '-2146959104' Then 'A non fatal error has been encountered while attempting to run the program. The program execution will be retried if the retry count has not been exceeded.'
When '-2146959336' Then 'The program cannot run at this time because the client is on the internet.'
When '-2146959337' Then 'The content hash string or hash version are empty or incorrect in the software distribution policy or the hash verification failed.'
When '-2146959339' Then 'Failed to notify caller that software distribution is paused because the paused state or paused cookie do not match.'
When '-2146959340' Then 'The program cannot run because it is targeted to a user, requires user input or is set to run in user context.'
When '-2146959341' Then 'This program cannot run because it depends on another program that has not run successfully before.'
When '-2146959342' Then 'There is no program currently running.'
When '-2146959343' Then 'The execution request was not found.'
When '-2146959344' Then 'A system restart is in progress or there is a pending execution for this program which requires a computer restart.'
When '-2146959351' Then 'Failed to get data from WMI.'
When '-2146959352' Then 'Failed to indicate the client cache is currently in use.'
When '-2146959354' Then 'The requested program is not currently pending.'
When '-2146959355' Then 'The policy for this program does not exist or is invalid.'
When '-2146959356' Then 'The program is disabled.'
When '-2146959358' Then 'Another execution for this program is already pending.'
When '-2146959359' Then 'Another software execution is in progress or a restart is pending.'
When '-2147012866' Then 'Network connection: Windows Update Agent encountered transient network connection-related errors'
When '-2147012867' Then 'Network connection: Windows Update Agent encountered transient network connection-related errors'
When '-2147012894' Then 'Network connection: Windows Update Agent encountered transient network connection-related errors'
When '-2147019465' Then 'A format exception was thrown. This typically indicates that the Package data is invalid. Please verify deployed package details'
When '-2147019511' Then 'An PSInvalidOperationException was received. The provided package is already installed, and reinstallation of the package was blocked. Check the AppXDeployment-Server event log for details'
When '-2147019519' Then 'Access Denied when executing scripts. Please upgrade power shell or set Execution Policy in Client Agent Settings'
When '-2147019520' Then 'Enforcement failed as an expected resource was not available. This may be related to the package failing updates, dependency or conflict violations. '
When '-2147023838' Then 'Windows: The service cannot be started, either because it is disabled or because it has no enabled devices associated with it'
When '-2147024894' Then 'The file you specified could not be found. This may be because it is not signed.'
When '-2147205071' Then 'Invalid DeleteClass syntax'
When '-2147205072' Then 'Invalid include file'
When '-2147205073' Then 'Error creating temporary file'
When '-2147205074' Then 'Qualifier is used outside of its scope'
When '-2147205075' Then 'Invalid qualifier syntax. Should be of the for Qualifier name:type=value,scope(class|instance), flavor(toinstance|etc);'
When '-2147205076' Then 'Invalid delete instance syntax, should be #pragma deleteinstance("instance path", FAIL|NOFAIL)'
When '-2147205077' Then 'CIM V2.2 feature not currently supported; data type'
When '-2147205078' Then 'CIM V2.2 feature not currently supported for qualifier value'
When '-2147205079' Then 'Expected brace or bad type'
When '-2147205080' Then 'Invalid flags syntax'
When '-2147205081' Then 'Arguments must have an "In" and/or "Out" qualifier'
When '-2147205082' Then 'Methods cannot return array values'
When '-2147205083' Then 'Combining "Restricted", and "ToInstance" or "ToSubClass" is not legal'
When '-2147205084' Then 'Alias cannot be used twice'
When '-2147205085' Then 'Combining Overridable, and NotOverridable is not legal'
When '-2147205086' Then 'Expected a flavor type such as ToInstance, ToSubClass, EnableOverride, or DisableOverride'
When '-2147205087' Then 'Duplicate qualifier declaration unexpected'
When '-2147205088' Then 'NULL elements in array are not supported'
When '-2147205089' Then 'Embedded objects may not be aliases'
When '-2147205090' Then 'This is not a valid MOF file'
When '-2147205091' Then 'Value out of range'
When '-2147205092' Then 'Invalid namespace syntax. References to other servers are not allowed!'
When '-2147205093' Then 'Duplicate property declaration unexpected'
When '-2147205094' Then '''CIMTYPE'' qualifier may not be specified directly in a MOF file. Use standard type notation'
When '-2147205095' Then 'Expected dollar sign. ''as'' keyword must be followed by an alias, of the form ''$name'''
When '-2147205096' Then 'Invalid instance declaration. Must start with ''instance of'''
When '-2147205097' Then 'Invalid class declaration'
When '-2147205098' Then 'Dollar sign must be followed by an alias name (an identifier)'
When '-2147205099' Then 'Type mismatch. The value specified could not be coerced into the appropriate type'
When '-2147205100' Then 'Unexpected character in class name (must be an identifier)'
When '-2147205101' Then 'Invalid namespace path syntax'
When '-2147205102' Then '#pragma must be followed by a valid keyword'
When '-2147205103' Then 'Duplicate amendment specifiers'
When '-2147205104' Then 'Invalid namespace path syntax'
When '-2147205105' Then 'Unexpected array initialization. Arrays must be declared with []'
When '-2147205106' Then 'Unexpected alias. Only references to class object can take alias values'
When '-2147205107' Then 'Typedefs and enumerated types are not currently supported'
When '-2147205108' Then 'Expected property or method name'
When '-2147205109' Then 'Unrecognized or unsupported type identifier'
When '-2147205110' Then 'Unexpected token at file scope'
When '-2147205111' Then 'Expected open parenthesis'
When '-2147205112' Then 'Expected type identifier'
When '-2147205113' Then 'Illegal constant value. (Numeric value out of range or strings without quotes)'
When '-2147205114' Then 'Expected closing parenthesis'
When '-2147205115' Then 'Expected closing bracket'
When '-2147205116' Then 'Missing closing brace, or illegal array element'
When '-2147205117' Then 'Expected open brace'
When '-2147205118' Then 'Expected semicolon or ''='''
When '-2147205119' Then 'Expected qualifier name, an identifier'
When '-2147209214' Then 'Resource Contention'
When '-2147209215' Then 'Retry Later'
When '-2147213309' Then 'This computer does not have the necessary domain permissions to support the security functions relating to the created subscription instance. Contact the Domain Administrator to get this computer added to the Windows Authorization Access Group.'
When '-2147213310' Then '''WITHIN'' clause must be used in this query due to lack of event providers'
When '-2147213311' Then 'Provider registration overlaps with system event domain'
When '-2147217271' Then 'Attempt to put an instance with no defined key.'
When '-2147217272' Then 'A provider failed to report results within the specified timeout.'
When '-2147217273' Then 'Client connection to WINMGMT needs to be encrypted for this operation. Please adjust your IWbemServices proxy security settings and retry.'
When '-2147217274' Then 'Fatal transport error, other transport will not be tried'
When '-2147217275' Then 'Provider not registered'
When '-2147217276' Then 'Provider already registered'
When '-2147217277' Then 'Schema required to complete the operation is not available'
When '-2147217278' Then 'The object must be committed and retrieved again before the requested operation can succeed'
When '-2147217279' Then 'Provider suspended'
When '-2147217280' Then 'The specified locale id was not valid for the operation.'
When '-2147217286' Then 'Veto put'
When '-2147217287' Then 'Veto delete'
When '-2147217288' Then 'Database version mismatch'
When '-2147217289' Then 'Rerun command'
When '-2147217290' Then 'Qualifier name too wide'
When '-2147217291' Then 'Method name too wide'
When '-2147217292' Then 'Class name too wide'
When '-2147217293' Then 'Property name too wide'
When '-2147217294' Then 'Invalid handle request'
When '-2147217295' Then 'Connection failed'
When '-2147217296' Then 'Handle out of date'
When '-2147217297' Then 'Unsupported locale'
When '-2147217298' Then 'Transaction forced rollback'
When '-2147217299' Then 'Transaction conflict'
When '-2147217300' Then 'Quota violation'
When '-2147217301' Then 'Ambiguous operation'
When '-2147217302' Then 'Invalid association'
When '-2147217303' Then 'Operation times out'
When '-2147217304' Then 'Null security descriptor used'
When '-2147217305' Then 'The client was not retrieving objects quickly enough from an enumeration'
When '-2147217306' Then 'An amended object cannot be put unless WBEM_FLAG_USE_AMENDED_QUALIFIERS is specified'
When '-2147217307' Then 'A class cannot be abstract if its superclass is not also abstract'
When '-2147217308' Then 'User credentials cannot be used for local connections'
When '-2147217309' Then 'This operator is not valid for this property type.'
When '-2147217310' Then 'Privilege not held.'
When '-2147217311' Then 'Event queue overflowed.'
When '-2147217312' Then 'A backup or restore was requested while WinMgmt is already running.'
When '-2147217313' Then 'Intrinsic event provider registration uses illegal query.'
When '-2147217315' Then 'Aggregation on a property that is an embedded object is not supported.'
When '-2147217316' Then '''Dot'' notation cannot be used on a property that is not an embedded object.'
When '-2147217317' Then 'Aggregation on all properties is not supported.'
When '-2147217318' Then '''BY'' cannot be used without ''GROUP WITHIN''.'
When '-2147217319' Then 'Class is not an event class.'
When '-2147217320' Then 'Unparsable query.'
When '-2147217321' Then 'The refresher is busy'
When '-2147217322' Then 'This method is disabled for this class'
When '-2147217323' Then 'This method is not implemented in any class'
When '-2147217324' Then 'A method was redeclared with a conflicting signature in a derived class.'
When '-2147217325' Then 'A non-overrideable qualifier was overridden in a derived class.'
When '-2147217326' Then 'A property was redefined with a conflicting type in a derived class.'
When '-2147217327' Then 'Class object already contains the maximum number of properties.'
When '-2147217328' Then 'Cannot change class index inheritance.'
When '-2147217335' Then 'Cannot change class key inheritance.'
When '-2147217336' Then 'Unsupported class update.'
When '-2147217337' Then 'Class derivation caused circular reference.'
When '-2147217338' Then 'Invalid flavor'
When '-2147217339' Then 'Server buffers are full and data cannot be accepted'
When '-2147217340' Then 'Server buffers are full and data cannot be accepted'
When '-2147217341' Then 'Invalid Duplicate Parameter.'
When '-2147217342' Then 'Invalid qualifier.'
When '-2147217343' Then 'Marshaling packet signature is invalid.'
When '-2147217344' Then 'Marshaling packet version mismatch.'
When '-2147217345' Then 'The marshaling packet type is unknown.'
When '-2147217346' Then 'The marshaling packet identifies an unknown object.'
When '-2147217347' Then 'Provider does not support put extensions'
When '-2147217348' Then 'The supplied buffer was too small'
When '-2147217349' Then 'Out of disk space'
When '-2147217350' Then 'Invalid object path'
When '-2147217351' Then 'Return Value has a parameter id.'
When '-2147217352' Then 'Non-consecutive parameter ids.'
When '-2147217353' Then 'Invalid parameter id.'
When '-2147217354' Then 'Missing parameter id.'
When '-2147217355' Then 'Unsupported parameter'
When '-2147217356' Then 'Propagated method'
When '-2147217357' Then 'Shutting down'
When '-2147217358' Then 'Call cancelled'
When '-2147217359' Then 'Invalid property'
When '-2147217360' Then 'System property'
When '-2147217361' Then 'Invalid method Parameter(s)'
When '-2147217362' Then 'Invalid method'
When '-2147217363' Then 'Invalid CimType'
When '-2147217364' Then 'Cannot be singleton'
When '-2147217365' Then 'Value out of range'
When '-2147217366' Then 'Invalid property type'
When '-2147217367' Then 'Invalid qualifier type'
When '-2147217368' Then 'Illegal null value'
When '-2147217369' Then 'Query not implemented'
When '-2147217370' Then 'Class has instances'
When '-2147217371' Then 'Class has children'
When '-2147217372' Then 'Provider is not capable of the attempted operation'
When '-2147217373' Then 'Attempt to modify read-only object or property failed'
When '-2147217374' Then 'Non-decorated object'
When '-2147217375' Then 'Invalid syntax'
When '-2147217376' Then 'Incomplete class'
When '-2147217377' Then 'Property can not be key'
When '-2147217378' Then 'Illegal operation'
When '-2147217379' Then 'Unexpected error'
When '-2147217380' Then 'Propagated property'
When '-2147217381' Then 'Propagated qualifier'
When '-2147217382' Then 'Override not allowed'
When '-2147217383' Then 'Object or property already exists'
When '-2147217384' Then 'Invalid query type'
When '-2147217385' Then 'Invalid query'
When '-2147217386' Then 'Invalid operation'
When '-2147217387' Then 'Transport failure'
When '-2147217388' Then 'Initialization failure'
When '-2147217389' Then 'Provider load failure'
When '-2147217390' Then 'Invalid provider registration'
When '-2147217391' Then 'Provider not found'
When '-2147217392' Then 'Invalid class'
When '-2147217393' Then 'Invalid object'
When '-2147217394' Then 'Invalid namespace'
When '-2147217395' Then 'Invalid superclass'
When '-2147217396' Then 'Not supported'
When '-2147217397' Then 'Invalid stream'
When '-2147217398' Then 'Critical error'
When '-2147217399' Then 'Not available'
When '-2147217400' Then 'Invalid parameter'
When '-2147217401' Then 'Invalid context'
When '-2147217402' Then 'Out of memory'
When '-2147217403' Then 'Type mismatch'
When '-2147217404' Then 'Provider failure'
When '-2147217405' Then 'Access denied'
When '-2147217406' Then 'Not found'
When '-2147217407' Then 'Generic failure'
When '-2147219691' Then 'No updates specified in requested job'
When '-2147219692' Then 'User based install not allowed as system restart is pending'
When '-2147219693' Then 'Software updates detection results not received yet'
When '-2147219694' Then 'A system restart is required to complete the installation'
When '-2147219695' Then 'Software updates deployment not active yet i.e., start time is in future'
When '-2147219696' Then 'Failed to compare process creation time'
When '-2147219697' Then 'Invalid updates installer path'
When '-2147219698' Then 'Empty command line specified'
When '-2147219699' Then 'Software update failed when attempted'
When '-2147219700' Then 'Software update execution timeout'
When '-2147219701' Then 'Failed to create process'
When '-2147219702' Then 'Invalid command line'
When '-2147219703' Then 'Failed to resume the monitoring of the process'
When '-2147219704' Then 'Software Updates Install not required'
When '-2147219705' Then 'Job Id mismatch'
When '-2147219706' Then 'No active job exists'
When '-2147219707' Then 'Pause state required'
When '-2147219708' Then 'Hard reboot is pending'
When '-2147219709' Then 'Another software updates install job is in progress. Only one job is allowed at a time.'
When '-2147219710' Then 'Assignment policy not found'
When '-2147219711' Then 'Software updates download not allowed at this time'
When '-2147219712' Then 'Software updates installation not allowed at this time'
When '-2147219815' Then 'Scan is already in progress'
When '-2147219816' Then 'Software update being attempted is not actionable'
When '-2147219817' Then 'Software update is already installed but just requires a reboot to complete the installation'
When '-2147219818' Then 'Software update is already installed'
When '-2147219819' Then 'Incomplete scan results'
When '-2147219820' Then 'WSUS source already exists'
When '-2147219821' Then 'Windows Updates Agent version too low'
When '-2147219822' Then 'Group policy conflict'
When '-2147219823' Then 'Software update source not found'
When '-2147219824' Then 'Software update is not applicable'
When '-2147219862' Then 'None of the child software updates of a bundle are applicable'
When '-2147219863' Then 'Not able to get software updates content locations at this time'
When '-2147219864' Then 'Software update still detected as actionable after apply'
When '-2147219865' Then 'No current or future service window exists to install software updates'
When '-2147219866' Then 'Software updates cannot be install outside service window'
When '-2147219867' Then 'Software update does not exist in the job'
When '-2147219868' Then 'Updates handler job was cancelled'
When '-2147219869' Then 'Failed to report installation status of software updates'
When '-2147219870' Then 'Failed to trigger installation of software updates'
When '-2147219871' Then 'Error while detecting updates status after installation success'
When '-2147219872' Then 'Unable to monitor a software update''s execution'
When '-2147219879' Then 'Error occurred reading policy for software update'
When '-2147219880' Then 'Software updates processing was cancelled'
When '-2147219881' Then 'Error while detecting software updates status after scan success'
When '-2147219882' Then 'Updates handler was unable to continue due to some generic internal error'
When '-2147219883' Then 'Failed to install one or more software updates'
When '-2147219884' Then 'Software update install failure occurred'
When '-2147219885' Then 'Software update download failure occurred'
When '-2147219886' Then 'Software update policy was not found'
When '-2147219887' Then 'Post install scan failed'
When '-2147219888' Then 'Pre install scan failed'
When '-2147219916' Then 'Legacy scanner not supported'
When '-2147219917' Then 'Offline scan is pending'
When '-2147219918' Then 'Online scan is pending'
When '-2147219919' Then 'Scan retry is pending'
When '-2147219920' Then 'Maximum retries exhausted'
When '-2147219927' Then 'Rescan of the updates is pending'
When '-2147219928' Then 'Invalid content location '
When '-2147219929' Then 'Process instance not found'
When '-2147219930' Then 'Invalid process instance information'
When '-2147219960' Then 'Invalid instance type'
When '-2147219961' Then 'Content not found'
When '-2147219962' Then 'Offline scan tool history not found'
When '-2147219963' Then 'Scan tool has been removed'
When '-2147219964' Then 'The ScanTool not found in job queue'
When '-2147219965' Then 'The ScanTool policy has been removed so cannot complete scan operation'
When '-2147219966' Then 'Content location request timeout occurred'
When '-2147219968' Then 'Scan Tool Policy not found'
When '-2147220694' Then 'Uninstall action is not defined for the deployment'
When '-2147220695' Then 'Script execution failed with error code -1. Failure may be related to execution policy. Please upgrade power shell or set Execution Policy in Client Agent settings'
When '-2147220697' Then 'Script execution failed with error code -1. Failure may be related to execution policy not being set to Bypass for power shell in agent settings'
When '-2147220698' Then 'The specified deployment action is not defined for the Deployment Type'
When '-2147220699' Then 'Error while detecting application after successful uninstall'
When '-2147220700' Then 'Error while detecting application after successful install'
When '-2147220702' Then 'Rule is in conflict with other rules'
When '-2147220703' Then 'The script execution has timed out.'
When '-2147220704' Then 'The script host has not been installed yet.'
When '-2147220714' Then 'CI Agent job was cancelled.'
When '-2147220715' Then 'CI Version Info not available.'
When '-2147220716' Then 'CI Version Info timed out.'
When '-2147220973' Then 'Enforcement Timed Out'
When '-2147352572' Then 'The software distribution policy was not found.'
When '-2147352574' Then 'The software distribution policy for this program was not found.'
When '-2147446127' Then 'The command timed out'
When '-2147446129' Then 'App-V command returned failure'
When '-2147446130' Then 'Could not uninstall the AppV deployment type because of conflict. The published components in this deployment type are still published by other deployment types. This deployment type will be always detected as long as other deployment types are still installed'
When '-2147446132' Then 'Could not find streaming distribution point for the AppV package'
When '-2147446133' Then 'Could not start the software because it is no longer installed on this computer.'
When '-2147446134' Then 'The AppV Client has reported a launch error'
When '-2147446136' Then 'The software cannot run at this time because a pending software update for it is being applied. Once the update has been installed, you can run the application.'
When '-2147446138' Then 'The AppV package has already installed higher version by another deployment type so we cannot install a lower version of the package'
When '-2147446139' Then 'The dependent AppV package is not installed'
When '-2147446142' Then 'AppV package registration or deletion failed due to a fatal error'
When '-2147450239' Then 'A supported AppV client is not installed'
When '-2147450364' Then 'No distribution points were found for the requested content.'
When '2359297' Then 'Windows Update Agent was stopped successfully.'
When '2359298' Then 'Windows Update Agent updated itself.'
When '2359299' Then 'Operation completed successfully but there were errors applying the updates.'
When '2359300' Then 'A callback was marked to be disconnected later because the request to disconnect the operation came while a callback was executing.'
When '2359301' Then 'The system must be restarted to complete installation of the update.'
When '2359302' Then 'The update to be installed is already installed on the system.'
When '2359303' Then 'The update to be removed is not installed on the system.'
When '2359304' Then 'The update to be downloaded has already been downloaded.'
When '2367509' Then 'The installation operation for the update is still in progress.'
When '262145' Then 'Already exists'
When '262146' Then 'Reset to default'
When '262147' Then 'Different'
When '262148' Then 'Timed out'
When '262149' Then 'No more data'
When '262150' Then 'Operation cancelled'
When '262151' Then 'Operation Pending'
When '262152' Then 'Duplicate objects'
When '262153' Then 'Access Denied'
When '262160' Then 'Partial Results'
end as LastErrorCode

from
v_R_System
join v_AssignmentState_Combined on v_AssignmentState_Combined.ResourceID = v_R_System.ResourceID
join v_CIAssignment on v_CIAssignment.AssignmentID = v_AssignmentState_Combined.AssignmentID

left outer join v_AdvertisementStatusInformation
on v_AssignmentState_Combined.LastStatusMessageID = v_AdvertisementStatusInformation.MessageID

-- select * from v_CIAssignment where assignmentname like '%patch%'
-- select * from v_CIAssignment where CollectionName like '%all systems%'
-- select * from v_AssignmentState_Combined
-- select * from v_AdvertisementStatusInformation

where
v_R_System.ResourceID = v_AssignmentState_Combined.ResourceID and
v_CIAssignment.AssignmentID = v_AssignmentState_Combined.AssignmentID and
--v_AdvertisementStatusInformation.MessageID = LastStatusMessageID and
v_AssignmentState_Combined.AssignmentID = @DeploymentID
and StateID 0 -- unknown
and StateID 1 -- Compliant
and StateID 2 -- Noncompliant
and StateID 4 -- Success
and StateID 5 -- Pending Restart
and StateID 7 -- Downloading
and StateID 8 -- Downloaded
and lasterrorcode 0 -- success

order by state

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s