Install Java silently using powershell in Azure Windows VM
Written by Akhil M Anil . To install Java silently using PowerShell in Windows VM, follow the following steps: Downloading Java can be done in two ways: Download your required Java version ( Java Downloads | Oracle ) to a folder in your Windows VM. Use PowerShell to Download Java to a folder. Follow the below steps for downloading Java through PowerShell : Initially copy the Download link for your required Java version, Java file name, and Location where you want to download Java in your VM to a notepad Open PowerShell Run the following command in PowerShell $url = "<your-copied url>" $filename = "<file_name>" $dest = "<outputfile-location\$filename>" Invoke-WebRequest -Uri $url -OutFile $dest For Example: $url = "https://download.oracle.com/java/18/latest/jdk-18_windows-x64_bin.exe" $filename = "jdk-18_windows-x64_bin.exe" $dest = "C:\Users\akhilanil\Desktop\Java\$filename" Invoke-WebRequest -Uri ...