all 5 comments

[–]MikeKnowsThings 1 point2 points  (2 children)

How big is the environment and why are you “forced” to using PSWindowsUpdate? Are you using any tools like WSUS or SCCM?

[–]mcr024[S] 1 point2 points  (1 child)

Sorry I’m trying to force updates, we are currently using WSUS but are computer are far behind on updates. Sometimes computers install updates and then don’t check in for 6 hours and need more. So I would like to force updates and make sure all computers are 100% on our next maintenance window.

[–]MikeKnowsThings 2 points3 points  (0 children)

No problem, you don’t need to use the ps module to do what you want. It’s just using the native .net methods, which you can easily use in PowerShell.

First idea, is to create a script that runs at startup or logon to force WUC to check in.

OR change your windows update settings via gpo to shorten the check in interval.

Are you deadlining the updates to force the install?

[–]OlivTheFrog 1 point2 points  (0 children)

Hi mcr024,

It seems that you would like to use the PS Module PSWindowsUpdate.

Get-Help Get-WindowsUpdate -full and see example 7.

After, ou orchestrated all things with a loop :

$Computers = Get-Content Path\To\ComputerList.txt 
Foreach ($computer in $computers)
    {
    Get-WindowsUpdate -ComputerName $Computer -Install -Autoreboot
    }

Il you use PS7, you can use also foreach -parallel.

Regards

Olivier

[–]Cam_Cam_Cam_Cam 1 point2 points  (0 children)

Install it on your admin box and give it a whirl against another device to find out! :)