Skip to content

Instantly share code, notes, and snippets.

@aessing
Created October 1, 2020 10:25
Show Gist options
  • Save aessing/e9ed66783b4e29a1be9eaba8fe5cd6b8 to your computer and use it in GitHub Desktop.
Save aessing/e9ed66783b4e29a1be9eaba8fe5cd6b8 to your computer and use it in GitHub Desktop.
Install Ngork on Windows (PowerShell)
# =============================================================================
# Install Ngork on Windows (PowerShell)
# https://ngrok.com/
# -----------------------------------------------------------------------------
# Developer.......: Andre Essing (https://www.andre-essing.de/)
# (https://github.com/aessing)
# (https://twitter.com/aessing)
# (https://www.linkedin.com/in/aessing/)
# -----------------------------------------------------------------------------
# THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
# =============================================================================
# Download and extract
Invoke-WebRequest -Uri "https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-windows-amd64.zip" -OutFile ngrok-stable-windows-amd64.zip -UseBasicParsing
Expand-Archive ./ngrok-stable-windows-amd64.zip ./ngrok -Force
# Move AzCopy
mkdir ~\AppData\Local\Programs\ngrok
Get-ChildItem ./ngrok/ngrok.exe | Move-Item -Destination ~\AppData\Local\Programs\ngrok\
# Add AzCopy to PATH
$userenv = [System.Environment]::GetEnvironmentVariable("PATH", "User")
[System.Environment]::SetEnvironmentVariable("PATH", $userenv + ";%USERPROFILE%\AppData\Local\Programs\ngrok", "User")
# Clean the kitchen
del -Force ngrok-stable-windows-amd64.zip
del -Force -Recurse .\ngrok\
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment