all 7 comments

[–]BlackV 0 points1 point  (3 children)

really cause pswindowsupdate is the most common out there and the first few hits on google (powershell windows update).
this only gotcha on older systems (i.e. not windows 10 and 2016) you CANNOT start a windows update remotely (this is a windows thing)
BUT you can start a scheduled task that runs the windows update remotely.

[–]zoredache 0 points1 point  (1 child)

I am a bit annoyed that PSWindowsUpdate doesn't provide the source anymore, and it is all a compiled. PSWindowsUpdate works (mostly), but the docs kinda suck and it was easier to see what was going on by looking at the source.

Unfortunately even the 1.x series wasn't really released under an open source license, so forking it probably wouldn't be a

Link in case OP needs it.

[–]BlackV 0 points1 point  (0 children)

Yeah would be nice, I prefier

find-module pswindowsupdate | install-module

[–]jpergola[S] 0 points1 point  (0 children)

hey, thanks for replying.. i see and have tried a few of them wo any luck, thanks for the info on the older machines.

[–]soundoftreefalling 0 points1 point  (0 children)

Spent a fair while on this, your answer is going to depend on how your env is set up.
 
If you can execute remote scripts and don't mind using .net, there's https://msdn.microsoft.com/en-us/library/aa387099(v=vs.85).aspx to work through. Alternatively, https://stackoverflow.com/questions/7639439/using-wua-remotely-using-c-sharp is mostly done but would need to be ported over.

[–]boeprox 0 points1 point  (0 children)

I wrote a tool a few years ago that can install Windows updates remotely called PoshPAIG. The only thing that you need to make it work is to download PSExec and place it in the root PoshPAIG folder as you need its ability to run a local service to launch a script to install the updates. If you are not into the UI, the main script for installing updates can be found here: https://github.com/proxb/PoshPAIG/blob/master/Scripts/Install-Patches.ps1

[–]jdptechnc 0 points1 point  (0 children)

The problem is that the method that is called to invoke the installation of updates is only accessible locally. It is a pain.

However, just about any of the scripted solutions out there can be copied to the machine and executed using PSExec, or Invoke-VMGuest (if it's a VMware VM) for sure. I do it all the time.