PSWindowsUpdate
PSWindowsUpdate copied to clipboard
Issues with -RecurseCycle parameter. Scheduled task ends with code 0x1
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?