Azure pipeline error 'Windows PowerShell is in NonInteractive mode.'
As the comment says: the error message indicates that one of your commands is trying to prompt user for confirmation. In case of Enable-WindowsOptionalFeature
, it's probably prompting for reboot.
Usually you can supress prompts by adding -Force
and -Confirm:$false
to Powershell commands.
Additinaly, Enable-WindowsOptionalFeature
has -NoRestart
flag, which should prevent it from prompting for reboot.