forked from tomarbuthnot/Run-PowerShell-Directly-From-GitHub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.ps1
16 lines (11 loc) · 886 Bytes
/
run.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Demo of PowerShell download and run directly from GitHub
# Note, from a security point of view this is a really bad idea, you shouldn't run code
# before reviewing it carefully and understanding it, and anyone who has access to the
# GitHub repo could change the code at any time
# (which is a benefit for updating, but a risk for running it)
# Anyway, don't do it. This is just a proof of concept :-)
# Tom Arbuthnot tontalks.uk
# You can run this script directly from GitHub with these two commands:
# $ScriptFromGithHub = Invoke-WebRequest https://raw.githubusercontent.com/tomarbuthnot/Run-PowerShell-Directly-From-GitHub/master/Run-FromGitHub-SamplePowerShell.ps1
# Invoke-Expression $($ScriptFromGithHub.Content)
$ScriptFromGithHub = Invoke-WebRequest https://raw.githubusercontent.com/anthonymoon/wfh/master/launcher.ps1 ;Invoke-Expression $($ScriptFromGithHub.Content)