You first need to allow remote scripts to be executed with:
set-executionpolicy remotesigned
Then you have to "Unblock" the downloaded ps1 file (Properties, click Unblock at the bottom).
Next you have to make sure that java.exe is in your path. After that you are good to go!