Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Launch automatically Windows Update on XP

$
0
0

Hello,

I have several XP machines to patch + reboot. So I'd like to be able to script this.
I saw that there were apps to do this but I 'd rather do without a third party application .

The best for me would be to have a powershell script, which from a server, would pick from a list of machines to update.
The beginning would be like something like this:

 

$computernames = (get-content “d:\computersList.txt”)
foreach ($computer in $computernames){"c:\pathtopstools\psexec.exe" \\$computer /u domain\adminuser /p password cmd.exe /c wuauclt.exe /updatenow
 
Does this could work? Is the syntax is correct ?

Thank you in advance

Viewing all articles
Browse latest Browse all 6937

Trending Articles