惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
F
Fortinet All Blogs
量子位
G
Google Developers Blog
J
Java Code Geeks
N
Netflix TechBlog - Medium
博客园 - 聂微东
宝玉的分享
宝玉的分享
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
月光博客
月光博客
The Cloudflare Blog
Apple Machine Learning Research
Apple Machine Learning Research
爱范儿
爱范儿
雷峰网
雷峰网
M
MIT News - Artificial intelligence
T
Tailwind CSS Blog
V
Visual Studio Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - 三生石上(FineUI控件)
Microsoft Azure Blog
Microsoft Azure Blog
aimingoo的专栏
aimingoo的专栏
Martin Fowler
Martin Fowler
有赞技术团队
有赞技术团队
T
The Blog of Author Tim Ferriss

お前はどこまで見えている

基于成交量预测市场走势 深入理解BashShell重定向 低延迟趋势线择时策略 波动率与换手率中的牛熊密码 通道突破择时策略 均线择时策略 Partial Plots 因子投资基础 Permutation Importance Use Cases for Model Insights 天文相关资源汇总 被讨厌的勇气 量化笔试数理知识复习 你当像鸟飞往你的山 Python模块logging 失去的二十年:日本经济长期停滞的真正原因 PyTorch的hook机制 A股交易规则 强化学习概述
PowerShell常见问题
hotarugali · 2024-05-28 · via お前はどこまで見えている

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

问题:打开 PowerShell,提示如下类似报错信息:

1
2
3
4
5
6
7
8
9
10
11
Windows PowerShell
版权所有(C) Microsoft Corporation。保留所有权利。

安装最新的 PowerShell,了解新功能和改进!https://aka.ms/PSWindows

. : 无法加载文件 C:\Users\xxx\Documents\WindowsPowerShell\profile.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参
阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。
所在位置 行:1 字符: 3
+ . 'C:\Users\xxx\Documents\WindowsPowerShell\profile.ps1'
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [],PSSecurityException

原因:Windows 下 PowerShell 的脚本执行策略的默认设置为 Restricted

1
2
PS C:\Windows\system32> get-ExecutionPolicy
Restricted

解决:以管理员身份运行 PowerShell,修改脚本执行策略:

1
PS C:\Windows\system32> set-ExecutionPolicy RemoteSigned

版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 お前はどこまで見えている

打赏

  • 微信

    微信

  • 支付宝

    支付宝