打開PowerShell時(shí),提示 “無法加載文件,因?yàn)樵诖讼到y(tǒng)上禁止運(yùn)行腳本” 的錯(cuò)誤
image.png
又或者遇到"無法加載文件C:\XXX\WindowsPowerShell\profile.ps1有巧,因?yàn)樵诖讼到y(tǒng)上禁止運(yùn)行腳本"的錯(cuò)誤
解決方法:
以管理員身份運(yùn)行PowerShell
執(zhí)行:get-ExecutionPolicy.查看PowerShell腳本運(yùn)行權(quán)限政策
執(zhí)行:set-ExecutionPolicy RemoteSigned即可
image.png
參數(shù):
image.png