ray15
(morph)
May 21, 2016, 8:54am
1
HI all,
I have a powershell script that installs windows updates automatically, mostly, after each update it comes up with a prompt to confirm, the script should be set to run quiet but it still comes up.
Love it if someone has an idea on it.
winupdate.ps1 (2.85 KB)
3 Spice ups
psophos
(M Boyle)
May 21, 2016, 10:07am
2
I’m pretty much guessing here. Could it be anything to do with this line:
$parameters = $command + "\quiet \norestart"
I added a space befire /quiet and also made them forward slashes.
$parameters = $command + " /quiet /norestart"
I combined the lines to make them easier to read.
$command = "`"$path\$msu`" /quiet /norestart"
$install = [System.Diagnostics.Process]::Start("wusa", $command)
2 Spice ups
ray15
(morph)
May 21, 2016, 10:19am
3
aha thank you it was simply the \ needed changing to a / it is working a dream now.
Thanks again.
1 Spice up