Van Der Hoff ICT Posted July 24, 2019 Posted July 24, 2019 (edited) Hi, We created a script which checks for Windows Updates, installs the updates, creates a report and reboots if necessary. This script runs in a single task and every system has it's own scheduled task. Unfortunately when I check the Script Output Results (where our report file is shown), I noticed the following error:  "Download Status: FAILED With Error -- You cannot call a method on a null-valued expression. The property 'Updates' cannot be found on this object. Verify that the property exists and can be set. Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))()" (See the attachment for a more detailed Script Output, the script is also attached.) I tried the following: - Run the script locally on a system > Runs successfully. (Probably permission error?) - Enabled the Powershell User Impersonation in the Pulseway Agent Manager (Administrator permissions) > Same error. - Tried using SubInACL to fix (https://answers.microsoft.com/en-us/windows/forum/windows_7-windows_update/windows-update-error-0x80070005-need-a-fix-click/e4cb8700-f215-4f1a-8bd4-6457ac619c19) > SubInACL error: "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing - RegSetKeySecurity Error : 5 Access is denied." > Still not fixed. I keep getting this error on a dosin of systems but can't figure out what the exact cause/problem is. Facts: - Not Windows Server version related > Error occurs on multiple Windows Server versions. - Script runs successfull locally on systems. Any ideas? Output example.txt Script.txt Edited July 24, 2019 by Van Der Hoff ICT
Staff Chris Posted July 24, 2019 Staff Posted July 24, 2019 Hi @Van Der Hoff ICT, Have you tried to use our bult-in script to install these updates? For more details please check out the following link. From the error log I can see that you are trying to call download on the array element which is null. If you want to troubleshoot this error then please verify that that element in array is not null. Â
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now