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

推荐订阅源

雷峰网
雷峰网
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Tailwind CSS Blog
F
Fortinet All Blogs
Microsoft Azure Blog
Microsoft Azure Blog
Jina AI
Jina AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
N
Netflix TechBlog - Medium
B
Blog RSS Feed
Blog — PlanetScale
Blog — PlanetScale
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
The Blog of Author Tim Ferriss
D
Docker
博客园 - 聂微东
博客园 - 【当耐特】
博客园 - 三生石上(FineUI控件)
L
LangChain Blog
量子位
宝玉的分享
宝玉的分享
博客园 - 司徒正美
The Cloudflare Blog
G
Google Developers Blog
Microsoft Security Blog
Microsoft Security Blog
腾讯CDC

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

基于成交量预测市场走势 深入理解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 许可协议。转载请注明来自 お前はどこまで見えている

打赏

  • 微信

    微信

  • 支付宝

    支付宝