2023年3月

https://www.cnblogs.com/wswind/p/10911286.html

Get-ExecutionPolicy -List #查看当前的执行策略
Set-ExecutionPolicy -Scope 范围 执行策略

Scopes 范围

Process / CurrentUser / LocalMachine

执行策略

Restricted / AllSigned / RemoteSigned / Unrestricted / Bypass / Undefined

常用策略:范围当前用户、仅远程脚本需要签署

Set-ExecutionPolicy -Scope CurrentUser RemoteSigned