Created
October 1, 2020 10:25
-
-
Save aessing/e9ed66783b4e29a1be9eaba8fe5cd6b8 to your computer and use it in GitHub Desktop.
Install Ngork on Windows (PowerShell)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ============================================================================= | |
# 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