Windows Update Standalone Installer (WUSA) returns 0x5 ERROR_ACCESS_DENIED when deploying .msu files through WinRM and Windows Remote Shell
Article
This article helps work around an issue that occurs when you deploy Windows Update .msu files through Windows Remote Management 2.0 and Windows Remote Shell.
Applies to: Windows 7 Service Pack 1 Original KB number: 2773898
Symptoms
Windows Update Standalone Installer (WUSA) returns 0x5 ERROR_ACCESS_DENIED when deploying Windows Update .msu files through Windows Remote Management 2.0 and Windows Remote Shell. You may also see the following in the Application Event log:
Source: Microsoft-Windows-WUSA Event ID: 3 Level: Error Description: Windows update could not be installed because of error 2147942405 "Access is denied."
Installing an update using WUSA or the WUA APIs on a remote machine isn't supported.
Workaround
To work around this issue, use the following method:
Extract the .msu file through Windows Remote Shell with WUSA using the following command:
The Windows Update Standalone Installer uses the Windows Update Agent API to install update packages. Update packages have a .msu file name extension. The .msu file name extension is associated with the Windows Update Standalone Installer.
The security restrictions on remote use of the WUA APIs are documented here:
Learn how to use Windows Server Update Services to deploy operating system updates to computers on your network. Select the appropriate deployment option and combine WSUS with Microsoft Azure Update Management to manage server updates.