Win10系统PowerShell执行.ps1文件

注:win10系统默认已安装了PowerShell

win+r打开运行:

输入:$PSVersionTable查看powershell版本

进入ps1文件目录:PS C:\Users\admin> cd E:\DevEnviroments\skype-docs-master\Skype\WebSDK\build
执行ps1文件:PS E:\DevEnviroments\skype-docs-master\Skype\WebSDK\build> .\Build-Samples.ps1

开启权限:set-executionpolicy remotesigned

结果提示要以管理员身份运行,

进入:C:\Windows\System32\WindowsPowerShell\v1.0

右键选择以管理员身份运行,进入后执行  set-executionpolicy remotesigned

 此时再执行ps1文件成功:

猜你喜欢

转载自blog.csdn.net/jinhaijing/article/details/85004126