Has anyone been able to get Windows Update working from Remote computer?

I am able to do everything else just about, but when I try and run Windows Update with the PSWindowsUpdate module, I get access denied from Remote system everytime. Ive seen a large number of posts online with the same issue. I was wondering if this can actually be done. I dont have my script that fails in front of me, Ill post it tomorrow when I do.

Thanks.

I would recommend spending your time on something more promising than using PowerShell to update Computers. Use WSUS instead - it is made for. :wink:

Gotya…
I have a bunch of tasks and wanted to minimize the amount of logging into the servers. But at the end of the day I will still need to login at least 1 time, so yea I can kick the update off then.

Thanks!

That shouldn’t be necessary at all. That’s what I meant. If you set up your WSUS (or SCCM) correctly the servers install the updates automatically.

oh yea I understand.

I’m in an environment without access to those atm.

Check the scripts that the Windows Admin Center team uses.

The Description of Install-WindowsUpdates has a note that you should find telling.

.DESCRIPTION
Create a scheduled task to run a powershell script file to installs all available windows updates through ComObject, restart the machine if needed.
This is a workaround since CreateUpdateDownloader() and CreateUpdateInstaller() methods can’t be called from a remote computer — E_ACCESSDENIED.
More details see Using WUA From a Remote Computer - Win32 apps | Microsoft Docs

2 Likes

Wow that helps, thanks krzydoug!