Answer the question
In order to leave comments, you need to log in
How to set answer "Yes" in PowerShell script when executed?
Recently got acquainted with Chocolate and PowerShell. All I need for now is to write the list of packages into one file, and have them installed as needed when I run them. For example, here's a simple script:
choco install ccleaner
choco install skype
choco install ruby
All this is a great thing, but with each installation a confirmation request is issued, which must be answered manually. How can I write such a script so that all packages are installed at once? Also what it is possible to provide in case of an error of installation of any package?
Answer the question
In order to leave comments, you need to log in
https://chocolatey.org/docs/commands-install
There is an answer to the first question, I won’t tell you exactly about errors, it’s usually customary to check the return code when the process ends. It's probably about the same here.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question