forked from ISeeDEDPpl/Questor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_Allow_All_Powershell_Scripts.cmd
71 lines (70 loc) · 2.52 KB
/
_Allow_All_Powershell_Scripts.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
:: Set-ExecutionPolicy
::
::Change the user preference for the execution policy of the shell.
::
::Syntax
:: Set-ExecutionPolicy [-executionPolicy] Policy
:: { Unrestricted | RemoteSigned | AllSigned | Restricted | Default | Bypass | Undefined}
:: [[-Scope] ExecutionPolicyScope ] [-Force]
:: [-whatIf] [-confirm] [CommonParameters]
::
::Key
:: -ExecutionPolicy Policy
:: A new execution policy for the shell.
::
:: Valid values:
::
:: Restricted
:: Do not load configuration files or run scripts.
:: This is the default.
::
:: AllSigned
:: Require that all scripts and configuration files be signed
:: by a trusted publisher, including scripts that you write on the
:: local computer.
::
:: RemoteSigned
:: Require that all scripts and configuration files downloaded
:: from the Internet be signed by a trusted publisher.
::
:: Unrestricted
:: Load all configuration files and run all scripts.
:: If you run an unsigned script that was downloaded from the
:: internet, you are prompted for permission before it runs.
::
:: Bypass
:: Nothing is blocked and there are no warnings or prompts.
::
:: Undefined
:: Remove the currently assigned execution policy from the
:: current scope. This parameter will not remove an execution
:: policy that is set in a Group Policy scope.
::
:: -Force
:: Suppress all prompts.
:: By default, Set-ExecutionPolicy displays a warning whenever the
:: execution policy is changed.
::
:: -Scope ExecutionPolicyScope
:: The scope of the execution policy.
::
:: Valid values:
:: Process Affect only the current PowerShell process.
:: CurrentUser Affect only the current user.
:: LocalMachine Affect all users of the computer.
::
:: To remove an execution policy from a particular scope, set the
:: execution policy for that scope to Undefined.
::
:: -WhatIf
:: Describe what would happen if you executed the command without actually
:: executing the command.
::
:: -Confirm
:: Prompt for confirmation before executing the command.
::
:: CommonParameters:
:: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -WarningAction, -WarningVariable,
:: -OutBuffer -OutVariable.
::
Set-ExecutionPolicy -ExecutionPolicy Unrestricted