無法加載文件,因為在此系統上禁止運行腳本
出現這種問題是由於腳本的執行策略沒有正確配置
解決方案
- 右鍵單擊開始菜單,選擇Windows PowerShell(管理員)
- 執行`get-ExecutionPolicy`查看當前的執行策略
- 執行`set-ExecutionPolicy RemoteSigned`修改執行策略
微軟官方文檔:
https://docs.microsoft.com/zh-cn/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.1&viewFallbackFrom=powershell-6
編輯區標尺設置
修改配置文件:
"editor.rulers": [
120
]