Powershell in NonInteractive mode
I just tried to use Remove-Item on the directory with children and got same message:
Remove-Item : PowerShell is in NonInteractive mode. Read and Prompt functionality is not available.
In my case -Recurse
key has helped.
Run with -Force
:
Stop-Process -InputObject $prc -ErrorAction SilentlyContinue -Force
As C.B. suggested in the comment: -confirm:$false
should also work. Rationale for this is as follows: -Confirm
is a switch parameter. Switch parameters can only take arguments if you specify the parameter with a trailing colon and a value.