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

推荐订阅源

T
The Blog of Author Tim Ferriss
S
Securelist
D
Docker
The Register - Security
The Register - Security
GbyAI
GbyAI
Recorded Future
Recorded Future
Engineering at Meta
Engineering at Meta
Stack Overflow Blog
Stack Overflow Blog
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
罗磊的独立博客
博客园 - 【当耐特】
F
Full Disclosure
WordPress大学
WordPress大学
腾讯CDC
小众软件
小众软件
大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
SecWiki News
SecWiki News
L
Lohrmann on Cybersecurity
I
InfoQ
MyScale Blog
MyScale Blog
量子位
Cyberwarzone
Cyberwarzone
博客园 - 三生石上(FineUI控件)
The Hacker News
The Hacker News
F
Fortinet All Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Jina AI
Jina AI
博客园_首页
H
Help Net Security
K
Kaspersky official blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Webroot Blog
Webroot Blog
Blog — PlanetScale
Blog — PlanetScale
V
Vulnerabilities – Threatpost
Y
Y Combinator Blog
The Cloudflare Blog
P
Proofpoint News Feed
V
Visual Studio Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tailwind CSS Blog
爱范儿
爱范儿
P
Privacy International News Feed
Security Archives - TechRepublic
Security Archives - TechRepublic
The GitHub Blog
The GitHub Blog
C
Cybersecurity and Infrastructure Security Agency CISA
B
Blog RSS Feed

小野博客

QQ音乐播放接口:PHP逆向分析与实现 CTF:最好的语言解密过程 狐蒂云疑似准备跑路:低价云服务器的水有多深 WeMod PRO 会员高级版脚本分享 一款可以屏蔽国外广告的IP过滤评论插件 当 PCDN 来敲门:一个"小"博客的 200G 流量惊魂记 船新升级!我的“一言”系统支持一键换肤了(内附10套精美皮肤) 再续前缘:利用自建一言Api接口嫁接给typecho 给网页装个“灵魂”:我写了一个超丝滑的【一言】自建语录api 桌面工具-极光便签-随时笔记
PowerShell 执行策略被禁止解决方法
小野 · 2026-03-25 · via 小野博客

警告标识

⚠️npm : 无法加载文件 C:\Program Files\nodejs\npm.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsof
t.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。
所在位置 行:1 字符: 1

  • npm install -g @openai/codex

    • CategoryInfo : SecurityError: (:) [],PSSecurityException
    • FullyQualifiedErrorId : UnauthorizedAccess

这是 Windows PowerShell 的执行策略限制导致的错误。PowerShell 默认禁止运行脚本文件


步骤 1:以管理员身份打开 PowerShell

  • 右键点击 PowerShell 图标 → "以管理员身份运行"或直接选择终端(管理员)

步骤 2:查看当前执行策略

Get-ExecutionPolicy

执行后返回结果:
Restricted(禁止运行脚本)

步骤 3:修改执行策略


Set-ExecutionPolicy RemoteSigned

输入 Y 确认

步骤 4:验证修改


Get-ExecutionPolicy

返回解除成功结果:RemoteSigned