Why PowerShell has an execution policy

As far as I understand how ExecutionPolicy works in PowerShell. Most of what I saw and did was how to disable it. There even a command line flag disables it (powershell -ExecutionPolicy Unrestricted ...).

So my question is why , not how . Why is this even a feature? In my experience, this was more of a nuisance; the only thing that has ever done for me is to annoy me, meanwhile, as I see it, β€œit is impossible to load because the script execution error has been disabled on this system”, and when I remember this flag is -ExecutionPolicy.

Why does PowerShell have such a function? It is like an alarm with a switch on on the outside of the building next to the front door.

(apologies if this question has already been answered in another way)

+4
source share
1 answer

ActiveX, ActiveX , . , IE, , , , . , , , . : ", ..."

Powershell. Powershell , .

, ( ) script?

script , , PS, script .

, Powershell, Powershell. script, PS.

- , script. , script, Powershell script. Powershell script, , . script, , , , script .

,

PowerShell.exe –ExecutionPolicy Bypass –File c:\temp\bad-script.ps1

. , , , ActiveX, Powershell.

Powershell , - . .

() PowerShells

. , , , . , .

+4

Source: https://habr.com/ru/post/1626912/


All Articles