Skip to content

Instantly share code, notes, and snippets.

View nycdotnet's full-sized avatar

Steve Ognibene nycdotnet

View GitHub Profile
@nycdotnet
nycdotnet / UpdateJava.ps1
Last active September 13, 2017 13:20
Java update PowerShell script
# This script will uninstall anything like *Java* from Add/Remove Programs, Unblock and Install a new JDK,
# and set the JAVA_HOME environment variable for the new version.
#
# You have to set the $jdkInstallerPath first to the location where you got the JDK. Such as:
# $jdkInstallerPath = "C:\Users\MyAccount\Downloads\jdk-7u60-windows-x64.exe"
#
# WARNING: This will uninstall ANYTHING that says Java anywhere in the name!!! Use with caution!!!
#
# Note: This assumes that you are using the x64 JDK on 64-bit Windows. Not tested in other scenarios.