Skip to content

Instantly share code, notes, and snippets.

@droyad
Last active December 2, 2015 05:00
Show Gist options
  • Save droyad/c2e7ea40a6a3c3abd0a3 to your computer and use it in GitHub Desktop.
Save droyad/c2e7ea40a6a3c3abd0a3 to your computer and use it in GitHub Desktop.
Powershell script to install node and NPM
$nodeVersion = "4.0.0"
Invoke-WebRequest "https://nodejs.org/download/release/v$nodeVersion/node-v$nodeVersion-x64.msi" -OutFile 'node.msi'
# If Invoke-WebRequest is not found on your version of PS:
#
# $request = [System.Net.WebRequest]::Create("https://nodejs.org/download/release/v$nodeVersion/node-v$nodeVersion-x64.msi")
# [System.Net.WebResponse]$response = $request.GetResponse()
# $file = [System.IO.File]::OpenWrite("node.msi")
# $response.GetResponseStream().CopyTo($file)
# $file.Close()
. .\node.msi /q /l node-install.log
Get-Content node-install.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment