J
J
Jimmy Exploit2016-07-24 00:55:25
PowerShell
Jimmy Exploit, 2016-07-24 00:55:25

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

1 answer(s)
#
#algooptimize #bottize, 2016-07-24
@Jimmy_Exploit

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 question

Ask a Question

731 491 924 answers to any question