Chocolatey Command Builder
choco install %software% -a
psexec64 -accepteula \\%host% cmd /c "choco install %software% -a"
Install Chocolatey:
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command " [System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
Install Chocolatey to a remote PC with psexec:
psexec64 -accepteula \\%host% cmd /c "@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command " [System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"" 2>nul
Suppress the confirmation prompt by enabling “allowGlobalConfirmation.”
choco feature enable -n allowGlobalConfirmation
Further Reading:
https://hull1.com/software_deployment/2020/08/03/chocolately.html
https://docs.microsoft.com/en-us/sysinternals/downloads/psexec
https://hull1.com/software_deployment/2020/08/10/scheduled-choco-updates.html