一、问题背景

Windows PowerShell

尝试新的跨平台 PowerShell https://aka.ms/pscore6
. : 无法加载文件 C:\Users\hp\Documents\WindowsPowerShell\profile.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_P
olicies。
C:\Users\hp\Documents\WindowsPowerShell\profile.ps1’
FullyQualifiedErrorId : UnauthorizedAccess

二、解决办法

在搜索中打开PowerShell,要以管理员身份打开

然后运行命令Get-ExecutionPolicy可以查看你的PowerShell执行策略

一般来说如果是restrict模式,就可能会出现上面的问题。

你可以通过执行命令Set-ExecutionPolicy RemoteSigned 或 Set-ExecutionPolicy Unrestricted改成RemoteSigned 或Unrestricted模式。

如果RemoteSigned 模式还是出现问题,那就改成Unrestricted模式。

一般改成Unrestricted模式,就会彻底解决不再发生。

【vscode】执行C++文件时出现错误法加载文件 C:\Users\hp\Documents\WindowsPowerShell\profile.ps1相关推荐

  1. 打开Windows Powershell时出现 :. : 无法加载文件C:\user\...\profile.ps1。未对文件profile.ps1进行数字签名。无法在当前系统上运行该脚本 的解决办法

    想使用Windows Powershell命令时,打开后出现如下报错: . : 无法加载文件 C:\Users\arxc\Documents\WindowsPowerShell\profile.ps1 ...

  2. 执行 taro init myApp 报错 无法加载文件 C:\Users\Administrator\AppData\Roaming\npm\taro.ps1

    执行 taro init myApp 报错 无法加载文件 C:\Users\Administrator\AppData\Roaming\npm\taro.ps1,因为在此系统上禁止运行脚本. taro ...

  3. powershell激活conda失败;无法加载文件 C:\Users\user\Documents\WindowsPowerShell\profile.ps1,因为在此系统上禁止运行脚本

    在执行vscode中 按F5调试python脚本时报以下错误 Exception has occurred: ImportError DLL load failed: 找不到指定的程序. File & ...

  4. 无法加载文件 C:\Users\haoqi\Documents\WindowsPowerShell\profile.ps1,因为在此系统上禁止运行脚本

    anaconda 卸载重装后,再次用VScode运行代码会报如下错误: 无法加载文件 C:\Users\haoqi\Documents\WindowsPowerShell\profile.ps1, 因 ...

  5. 未对文件 C:\Users\Administrator\Documents\WindowsPowerShell\profile.ps1 进行数字签名。无法在当前系统上运行该脚本。

    未对文件 C:\Users\Administrator\Documents\WindowsPowerShell\profile.ps1 进行数字签名.无法在当前系统上运行该脚本. 根据文档修改发现 也 ...

  6. powershell配置anaconda及解决【无法加载文件C:\Users\xxx\Documents\WindowsPowerShell\profile.ps1,因为在此系统上禁止运行脚本】的问题

    配置 Anaconda安装教程 安装好Anaconda后,cmd中可以正常使用,但powershell中无法activate环境(在我电脑上的表现为activate后通过conda env list查 ...

  7. 问题随记 ——【Windows】无法加载文件 C:\Users\Administrator\Documents\WindowsPowerShell\profile.ps1

    文章目录 问题描述 解决方法 问题描述 打开 PowerShell 出现以下报错: . : 无法加载文件 C:\Users\Administrator\Documents\WindowsPowerSh ...

  8. 【Vue】错误 : 无法加载文件 C:\Users\Administrator\AppData\Roaming\npm\vue.ps1,因为在此系统上禁止运行脚本的解决方法

    执行vue -version时,提示错误:无法加载文件 C:\Users\Administrator\AppData\Roaming\npm\vue.ps1,因为在此系统上禁止运行脚本 1.用管理员权 ...

  9. UI5:创建.yaml文件报错:无法加载文件 C:\Users\86178\AppData\Roaming\npm\ui5.ps1

    VSCode中执行ui5 init命令时报错: *PS C:\Users\86178\Desktop\APP1> ui5 init ui5 : 无法加载文件 C:\Users\86178\App ...

最新文章

  1. 用一个创业故事串起操作系统原理(一)
  2. brew install php55 报错 clang: error
  3. Microsoft Power BI Desktop概念学习系列之Microsoft Power BI Desktop的下载和安装(图文详解)...
  4. 0 基础转行 Android 工程师是种怎样的体验?
  5. 【图像配准】基于matlab GUI光流场模型图像配准【含Matlab源码 831期】
  6. android实现地图功能实现,Android百度地图应用之基本地图功能实现
  7. 【JSP】EL表达式和JSTL
  8. Python 实现窗函数
  9. linux百度资源网盘,百度网盘 linux版
  10. 分享一个下载系统镜像的网站
  11. php DOS word在线预览,如何在 Zoho Docs 中在线预览文件
  12. 矽力杰SY8088国产代替料RY3408
  13. summernote图片上传
  14. Visial Studio中“变量已被优化掉 因而不可用”的解决方案
  15. 【问题思考总结】旋转体的体积和函数在直线上下有关吗?【几何+微元】
  16. 【云栖大会】基因行业陷入“怪圈”,数据存储成本竟然超过检测成本
  17. 大数据上云存算分离演进思考与实践
  18. 换钱问题(经典枚举样例)
  19. MVC三层架构各层含义
  20. Mysql完整执行顺序

热门文章

  1. 法兰(工具零件)与法兰圈_百度百科
  2. 订单号怎样生成才能好用又好看,难倒了20多位产品经理
  3. 计算机网络--边缘和核心部分,三种数据交换方式
  4. Informatica的FTP功能如何使用|infa怎么实现ftp文件自动上传
  5. CSS:标准文档流、浮动、绝对定位—(解决有时候父元素不能自动扩展)
  6. EasyUi之Dialog(对话框窗口)
  7. Java码农坎坷之路~单例抽象类接口
  8. 最长回文子串(C++)
  9. linux实时realtime,康佳特与OSADL携手优化 Real-Time Linux 的支持 顺利实现硬实时
  10. 英特尔带来服务器的作用是,[精彩观点]英特尔7400带来x86服务器虚拟化新实践