So my goal here is to run commands like get-adcomputer | Install-WindowsUpdate -AcceptAll -AutoReboot
I want to get all of my AD computers and pipe the ComputerName to the ComputerName property in Install-WindowsUpdate
. I tried a @foreach statement but it takes forever to run because it does them one at a time. I'm looking for it to do multiple computers at once.
Any ideas?
PSWindowsUpdate
from the powershellgallery site, then the cmdlet has been remapped >>>New-Alias Install-WindowsUpdate Get-WindowsUpdate
. if that is so ... then that command DOES NOT accept pipeline input. ///// [3] have you tried usingInvoke-Command
to run things in parallel?Read The Friendly Manual
[grin], the instructions seem pretty clear on how to use theI-C
cmdlet. the main gotcha is variable scope - and the easiest solution to that is the$Using:
scope modifier. if that doesn't help, then i recommend you either do a search on examples for usingI-C
, OR that you try to find a support forum for that module. ///// good luck! [grin]