Get-WURebootStatus - disable yes/no question
Hello
How can I disable the Y/N question? I don't want to reboot. I just want to get the info ComputerName RebootRequired and RebootScheduled.
PS C:\WINDOWS\system32> Get-WURebootStatus
Reboot is required. Do it now? [Y / N] (default is 'N')
n
ComputerName RebootRequired RebootScheduled
------------ -------------- ---------------
COMP True
Get-WURebootStatus -Silent does not show the Y/N question but also does not show ComputerName RebootRequired and RebootScheduled.
Same issue here.
I'm using this project in my automatic Windows Setup Script. The problem, i have, is that it asks this Question even if you're using -IgnoreReboot.
The Script starts with -ExecutionPolicy Bypass –NoProfile -NonInteractive, in the script, I've set ConfirmPreference to None with Set-Variable -Name 'ConfirmPreference' -Value 'None' -Scope Global and I'm installing Updates with Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -ForceDownload -ForceInstall -IgnoreReboot -Confirm:$false -ErrorAction SilentlyContinue -WarningAction SilentlyContinue but it still requires user-input. What's funny is that it tells me first Reboot is required but do it manually and then like 5 seconds later it asks for user-input.
Yes, I'm aware of the -Silent Parameter but then i encountered on another Bug which simply ignores about the additional updates and that's why i can't use -Silent.