直接执行PowerShell脚本

第一种

系统提示报错

因为此系统上禁止运行脚本。有关详详细信息,请参阅 https://go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies.

打开powershell

Set-ExecutionPolicy Restrioted

. .\group.ps1

第二种

运行命令直接执行脚本

powershell.exe -NoP -NonI -Exec Bypass .\group.ps1

猜你喜欢

转载自blog.csdn.net/u012206617/article/details/127187865