Update to Quick run.
This should now work. It changes the exectuion policy, runs the script, and then resets the policy.
This commit is contained in:
parent
5eeae58fdf
commit
bc7471ccd6
@ -24,12 +24,14 @@ It currently outputs:
|
||||
|
||||
## Quick Run
|
||||
|
||||
Copy and past into `CMD`
|
||||
Copy and past into `CMD`
|
||||
|
||||
**[Note:]** must be run from an admin prompt.
|
||||
|
||||
```powershell
|
||||
curl https://efrick.ddns.net/git/efrick/Sysinfo/raw/branch/master/sysinfo.ps1 > %userprofile%\AppData\Local\Temp\sysinfo.ps1;
|
||||
|
||||
Powershell.exe -command "cd $env:userprofile; AppData\Local\Temp\sysinfo.ps1 -write_output"
|
||||
Powershell.exe -command "$current_execution_policy = Get-ExecutionPolicy; Set-ExecutionPolicy Bypass CurrentUser ;cd $env:userprofile; AppData\Local\Temp\sysinfo.ps1 -write_output; Set-ExecutionPolicy $current_execution_policy CurrentUser"
|
||||
|
||||
del %userprofile%\AppData\Local\Temp\sysinfo.ps1
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user