Powershell install Java silently Powershell install Java silently powershell powershell

Powershell install Java silently


I found solution in cmdLet Execute-Process via this script. Works fine!

And calling it:

Execute-Process '\\srv\java\jre-8u45-windows-x64.exe' -Arguments '/s INSTALL_SILENT=1 STATIC=0 AUTO_UPDATE=0 WEB_JAVA=1 WEB_JAVA_SECURITY_LEVEL=H WEB_ANALYTICS=0 EULA=0 REBOOT=0 NOSTARTMENU=0 SPONSORS=0 /L c:\temp\jre-8u45-windows-x64.log'


The option you pass to the installer are only valid for an installation configuration file. If you do not want to use a configuration file you can use the following command line options for a silent install.


[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12