From bc7471ccd60c931f3ba91376323fc19891a5aa59 Mon Sep 17 00:00:00 2001 From: efrick Date: Fri, 23 Apr 2021 11:15:36 -0400 Subject: [PATCH] Update to Quick run. This should now work. It changes the exectuion policy, runs the script, and then resets the policy. --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 11622b4..820b67a 100644 --- a/README.md +++ b/README.md @@ -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