当前位置:网站首页>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
边栏推荐
猜你喜欢
Read paper 20 together: spatiotemporal prediction of PM2.5 concentration by idw-blstm under different time granularity
Small program input element moving up
Reread the classic: end to end object detection with transformers
Applet - uniapp realizes the functions of two-dimensional code picture pop-up and picture saving
CTFSHOW SQL注入篇(211-230)
Mongodb compass connects to the Alibaba cloud remote server database or reports an error occurred while loading instance info: command hostinfo req
[chapter 67 of the flutter problem series] the solution to the problem that the get plug-in cannot jump to the route twice in the dialog pop-up window in flutter
Introduction to applet Basics (dark horse learning notes)
Sword finger offer 56 - I. number of occurrences in the array
Redis
随机推荐
Ctfshow SQL injection (231-253)
Tita绩效宝:远程一对一面谈的问题
[chapter 67 of the flutter problem series] the solution to the problem that the get plug-in cannot jump to the route twice in the dialog pop-up window in flutter
Ionic Cordova command line
[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
Go/golang connection to database
Redis data persistence
一款开源的Markdown转富文本编辑器的实现原理剖析
出现Could not find com.scwang.smart:refresh-layout-kernel:2.0.3.Required by: project :app 无法加载第三方包情况
EMC整改纲要
February 25, 2021 (Archaeology 12 year Landbridge provincial competition)
A simple understanding of consistent hash
Collection of wrong questions in soft test -- morning questions in the first half of 2010
Day45. data analysis practice (1): supermarket operation data analysis
2022年建筑架子工(建筑特殊工种)特种作业证考试题库及在线模拟考试
用navicat将mysql数据转化为postgresql
2022年氧化工艺操作证考试题库及模拟考试
2022道路运输企业安全生产管理人员操作证考试题库及答案
Uni app dynamic add style dynamic bind background image invalid
Dagger2学习之Module的应用(二)