mgajda83 / PSWindowsUpdate

This module contain cmdlets to manage Windows Update Client.
MIT License
293 stars 25 forks source link

Enable-WURemoting - Windows PowerShell is in NonInteractive mode. Read and Prompt functionality is not available. #33

Open markusastone opened 2 months ago

markusastone commented 2 months ago

Hello

The most recent update to PSWindowsUpdate has introduced a confirmation prompt when Enable-WURemoting is run. There does not appear to be a -force option, meaning that non-interactive scripts cannot run this command without the following error: Windows PowerShell is in NonInteractive mode. Read and Prompt functionality is not available.

This currently breaks our automated patching and we're currently working around it by not running this command, but this will cause issues to new systems we bring online.

Can you please add a -force option that can allow this command to run, without confirmation?

Cheers

robvh1 commented 2 months ago

Same message also comes up when doing an Update-WUModule Likely it also triggers Enable-WURemoting In your case you could try Enable-WURemoting -Confirm:$false Did not see a promt when testing that way

Update-WUModule has an option to set -confirm:$false, but that does not make a difference for this prompt