PSWindowsUpdate icon indicating copy to clipboard operation
PSWindowsUpdate copied to clipboard

Issues with -RecurseCycle parameter. Scheduled task ends with code 0x1

Open farigiss opened this issue 1 year ago • 0 comments

I run the command Install-WindowsUpdate -AcceptAll -AutoReboot -RecurseCycle 5 -Verbose

Updates are installed, a reboot is forced, a task gets added to the task scheduler. The action of the task that gets created is powershell.exe -Command "Get-WindowsUpdate -AcceptAll -Download -Install -AutoReboot -RecurseCycle 4 -Verbose *>&1 | Out-File $Env:TEMP\PSWindowsUpdate.log -Append"

Here's the issue:

The task ends with a 0x1 code.

The Out-File cmdlet does not produce any log file as far as I can tell. The task is executed as SYSTEM. $Env:Temp resolves to C:\Windows\Temp for that user. I cannot I cannot find a log file there.

I noticed the RecurseCycle parameter got added not too long ago. Is it unfinished?

farigiss avatar Oct 22 '24 14:10 farigiss