Skip to content

Commit 34d022e

Browse files
author
Captain Chicky
authored
Update Set Powershell execution policy via batch at start.cmd
1 parent cf94d13 commit 34d022e

File tree

1 file changed

+13
-18
lines changed

1 file changed

+13
-18
lines changed

Set Powershell execution policy via batch at start.cmd

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@echo off
22
title Set the PowerShell Execution Policy
3-
color 0c
3+
color 0e
44
mode 1000
55
cls
66
goto Pre
@@ -76,26 +76,21 @@ echo AllSigned = AS
7676
echo RemoteSigned = RS (recommended)
7777
echo Unrestricted = UR
7878
echo Bypass = BY (not recommended)
79-
set /p "choice=Your choice?..."
80-
if /i "%choice%" == "RT" (
79+
SET /P "choice=Your choice?..."
80+
IF /I "%choice%" == "RT" (
8181
goto RT
82-
)
83-
else if /i "%choice%" == "AS" (
82+
) else IF /I "%choice%" == "AS" (
8483
goto AS
85-
)
86-
else if /i "%choice%" == "RS" (
84+
) else IF /I "%choice%" == "RS" (
8785
goto RS
88-
)
89-
else if /i "%choice%" == "UR" (
90-
goto UR
91-
)
92-
else if /i "%choice%" == "BY" (
93-
goto BY
94-
)
95-
else (
96-
echo "%choice%" is not a valid choice. Please type one of the given two letter shorthands for the execution level(capitalization doesn't matter).
97-
pause
98-
cls
86+
) else IF /I "%choice%" == "UR" (
87+
goto UR
88+
) else IF /I "%choice%" == "BY" (
89+
goto BY
90+
) else (
91+
ECHO "%choice%" is not a valid choice. Please type one of the given two letter shorthands for the execution level(capitalization doesn't matter).
92+
PAUSE
93+
CLS
9994
goto Start
10095
)
10196

0 commit comments

Comments
 (0)