I have a few powershell scripts which trigger from a C# codepart.
They run non-interactive and there is no way to confirm any command.
In Powershell, we can set the ErrorActionPreference
global with $ErrorActionPreference = "Stop"
Is there a same way to set on each command the confirm parameter to $false if it exists ?
You can try with:
$ConfirmPreference = "None"
Read here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With