当前位置:网站首页>PowerShell: because running scripts is prohibited on this system, the solution
PowerShell: because running scripts is prohibited on this system, the solution
2022-06-13 04:36:00 【A boy looking forward to the future】
The article is from whale :https://www.jingyua.com
Make it up by yourself PowerShell I suddenly encountered this problem during the script :
Unable to load file C:\Users\DH\Desktop\cs\rename.ps1, Because scripts are not allowed to run on this system . For more information , see also https:/go.microsoft.com/fwlink/?LinkID=135170 Medium about_Execution_Policies.
+ CategoryInfo : SecurityError: (:) [],ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnauthorizedAccess

Screenshot of the problem
After checking, it was found that it was started on the computer Windows PowerShell when , The execution strategy is likely to be Restricted( default setting ).
Restricted Execution policy does not allow any scripts to run .
AllSigned and RemoteSigned Execution strategies prevent Windows PowerShell Run a script without a digital signature .
This topic explains how to run the selected unsigned script ( Even when the execution strategy is RemoteSigned Under the circumstances ), It also explains how to The script is signed for your own use .
of Windows PowerShell Details of the execution policy , see also about_Execution_Policy.
Want to know Active execution policy on the computer , open PowerShell Then input get-executionpolicy

Active execution strategy
Open as administrator PowerShell Input set-executionpolicy remotesigned

choice Y Then the computer can execute the script file written by itself
边栏推荐
猜你喜欢

用navicat将mysql数据转化为postgresql

如何只用4步,实现一个自定义JDBC驱动?

Li Kou brush question 338 Bit count

前几年的互联网人vs现在的互联网人

Li Kou brush question 647 Palindrome substring
![C#获取WebService接口的所有可调用方法[WebMethod]](/img/44/4429b78c5b8341ed9a4a08d75a683e.png)
C#获取WebService接口的所有可调用方法[WebMethod]

Ultra quicksort reverse sequence pair

EMC rectification outline

Collection of wrong questions in soft test -- morning questions in the first half of 2011

【Flutter 问题系列第 67 篇】在 Flutter 中使用 Get 插件在 Dialog 弹窗中不能二次跳转路由问题的解决方案
随机推荐
【自动化测试】关于unittest你需要知道的事
Redis主从复制、哨兵模式、集群
Analysis of the implementation principle of an open source markdown to rich text editor
Get verification code
如何只用4步,实现一个自定义JDBC驱动?
[flutter problem Series Chapter 67] the Solution to the problem of Routing cannot be jumped again in in dialog popup Using get plug - in in flutter
Record a troubleshooting process - video call cannot be picked up
ES6 learning
【Flutter 问题系列第 67 篇】在 Flutter 中使用 Get 插件在 Dialog 弹窗中不能二次跳转路由问题的解决方案
MySQL索引
Solve the problem of running server nodemon reporting errors
Swiper plug-in
SEO specification
Introduction to applet Basics (dark horse learning notes)
剑指 Offer 56 - I. 数组中数字出现的次数
PHP security development 15 user password modification module
推荐的图片临时在线压缩工具
Webpack system learning (VIII) how contenthash can prevent browsers from using cache files
Common ways to traverse map sets
Get parameters on link