相关疑难解决方法(0)

无法加载文件,因为在此系统上禁用了脚本的执行

File C:\Users\Acer\Desktop\Projelerim\BEM_CANLI\BEM\packages\EntityFramework.5.
0.0\tools\init.ps1 cannot be loaded because its execution is blocked by softwar
e restriction policies. For more information, contact your system administrator.
At line:1 char:44
+ $__pc_args=@(); $input|%{$__pc_args+=$_}; & <<<<  'C:\Users\Acer\Desktop\Proj
elerim\BEM_CANLI\BEM\packages\EntityFramework.5.0.0\tools\init.ps1' $__pc_args[
0] $__pc_args[1] $__pc_args[2]; Remove-Variable __pc_args -Scope 0
    + CategoryInfo          : NotSpecified: (:) [], PSSecurityException
    + FullyQualifiedErrorId : RuntimeException
Run Code Online (Sandbox Code Playgroud)

我在包管理器控制台中遇到上述错误.我找到了一些解决方案,但我无法修复它.我试过以下

PowerShell说"在这个系统上禁用了脚本的执行."

http://sqlish.com/file-ps1-cannot-be-loaded-because-the-execution-of-scripts-is-disabled-on-this-system-please-see-get-help-about_signing-for-更多细节/

我改变了执行政策,

在此输入图像描述

但我总是得到同样的错误.

powershell entity-framework ef-code-first

3
推荐指数
1
解决办法
6429
查看次数

激活虚拟环境在 powershell 中引发错误

我正在使用 Windows PowerShell。但是,我不知道为什么,当我尝试激活 python 虚拟环境时,出现此错误:

venv\Scripts\activate : File C:\Users\Dell\Desktop\flask\microblog\venv\Scripts\Activate.ps1 
cannot be loaded because running scripts is disabled on this system. For more information, see    
about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ venv\Scripts\activate
+ ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess
Run Code Online (Sandbox Code Playgroud)

这是我运行的命令:

venv\Scripts\activate
Run Code Online (Sandbox Code Playgroud)

这是第一次发生。问题是什么?

powershell

3
推荐指数
1
解决办法
4422
查看次数

在 Office 插件生成器 Yeoman 中运行“yo office”时出现执行策略错误

我想使用 yeoman 为带有 Angular 的办公室创建一个插件。在power shell中安装了nodeJs、Angular、yeoman、generator-office等需求工具后,我尝试运行此代码

yo office 
Run Code Online (Sandbox Code Playgroud)

但我收到了这个错误:

 yo : File C:\Users\ME\AppData\Roaming\npm\yo.ps1 cannot be loaded. 
The file C:\Users\ME\AppData\Roaming\npm\yo.ps1 is not digitally signed. 
You cannot run this script on the current system. 
For more information about running scripts and setting execution policy, 
see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ yo office
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess  
Run Code Online (Sandbox Code Playgroud)

powershell office-addins yeoman angular project-web-addins

3
推荐指数
1
解决办法
863
查看次数

无法加载 Powershell,因为该系统上禁用了运行脚本

我的问题与纱线有关。在我开始创建项目之前,我使用 npm 安装了。很长一段时间后,当我想开始使用纱线运行时,它显示以下错误:

yarn : File C:\Users\pc\AppData\Roaming\npm\yarn.ps1 cannot be loaded because running scripts is disabled on this system.
Run Code Online (Sandbox Code Playgroud)

(在 Windows 机器、Powershell 中)

窗户:10

我尝试使用 git bash 终端,它成功了!
但不在我的 powershell 终端中

windows powershell yarnpkg

2
推荐指数
1
解决办法
7447
查看次数

如何在 Windows 10,11 上使用 CLI 或 Powershell 命令执行curl

想要在 Linux 下的 Bash 中找到与此等效的内容

sh <(curl https://sample.com/cli.sh)
Run Code Online (Sandbox Code Playgroud)

在 Windows CLI 或 Powershell 中

我知道Windows 中安装了curl。我怎样才能实现它?

有人会说这样不安全。我还将有一个带有 Windows Powershell 的 cli.ps1。

windows powershell curl invoke-webrequest

2
推荐指数
1
解决办法
5010
查看次数

在批处理文件中使用HH:MM:SS的算术运算

在我的一个批处理脚本中,我需要计算视频文件中间隔的持续时间.首先,要求用户输入开始和结束时间:

set /p StartPosition=Start position (HH:MM:SS):
set /p EndPosition=End position (HH:MM:SS):
Run Code Online (Sandbox Code Playgroud)

然后,我希望批处理脚本计算两者之间的持续时间.

我怎么能减去%StartPosition%%EndPosition%这样的,例如:

00:10:40 - 00:10:30 = 00:00:10

我无法弄清楚如何做到这一点的原因是因为这些数字是用冒号分隔的.

编辑:这个问题与这个问题不同,因为我不需要将数字作为时间值来处理.

cmd batch-file

0
推荐指数
1
解决办法
2699
查看次数

我正在尝试创建反应应用程序,但一直告诉我未经授权的访问

PS C:\Users\Bonnie_Py\Desktop\fullstack js>  create-react-app
react-app create-react-app : File C:\Users\Bonnie_Py Dev\AppData\Roaming\npm\create-react-app.ps1 
cannot be loaded because running scripts is disabled on this system.  For more information, see about_Execution_Policies at
https:/go.microsoft.com/fwlink/?LinkID=135170.

At line:1 char:2
 +  create-react-app react-app
 +  ~~~~~~~~~~~~~~~~
     + CategoryInfo          : SecurityError: (:) [], PSSecurityException
     + FullyQualifiedErrorId : UnauthorizedAccess
Run Code Online (Sandbox Code Playgroud)

javascript node.js express

0
推荐指数
1
解决办法
3504
查看次数

安装Vue后无法创建Vue项目,怎么办?

我安装了vue,但无法创建Vue项目,因为运行命令“vue create project”后出现以下错误。我使用的是 Windows 10 专业版。

\n\n
\n

错误:\n vue:无法加载文件\n C: \\ Users \\ leoca \\ AppData \\ Roaming \\ npm \\ vue.ps1,因为该系统上\n 禁用了脚本执行。有关详细信息\n 有关详细信息,请参阅 about_Execution_Policies,网址为\n https://go.microsoft.com/fwlink/?LinkID=135170。\n 行内:1 个字符:1\n + vue 创建计算器\n + ~~ ~\n \xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0 + CategoryInfo: ErrodeSecurity: (:) []\n \xc2\xa0\xc2\xa0\xc2\xa0 , PSSecurityException\n \xc2\ xa0\xc2\xa0\xc2\xa0\xc2\xa0 + ExcellentQualifiedErrorId: UnauthorizedAccess

\n
\n\n

我应该怎么办?

\n

node.js vue.js

-3
推荐指数
1
解决办法
2497
查看次数