https://technet.microsoft.com/en-us/library/hh847748.aspx?f=255&MSPPError=-2147217396

在powershell中执行命令

Get-ExecutionPolicy -List

此命令也可以使用tab键进行辅助

Scope ExecutionPolicy
----- ---------------
MachinePolicy Undefined
UserPolicy Undefined
Process Undefined
CurrentUser Undefined
LocalMachine Undefined

查询指定的Scope的ExecutionPolicy

Get-ExecutionPolicy -Scope CurrentUser

Get-ExecutionPolicy CurrentUser

CHANGE YOUR EXECUTION POLICY
------------------------------
To change the Windows PowerShell execution policy on your
computer, use the Set-ExecutionPolicy cmdlet. The change is effective immediately; you do not need to restart
Windows PowerShell. If you set the execution policy for the local computer (the default)
or the current user, the change is saved in the registry and remains
effective until you change it again. If you set the execution policy for the current process, it is
not saved in the registry. It is retained until the current
process and any child processes are closed. Note: In Windows Vista and later versions of Windows, to run
commands that change the execution policy for the local
computer (the default), start Windows PowerShell with the
"Run as administrator" option. To change your execution policy, type: Set-ExecutionPolicy -ExecutionPolicy <PolicyName> For example: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned To set the execution policy in a particular scope, type: Set-ExecutionPolicy -ExecutionPolicy <PolicyName> -Scope <scope> For example: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser A command to change an execution policy can succeed but
still not change the effective execution policy. For example, a command that sets the execution policy for
the local computer can succeed but be overridden by the
execution policy for the current user.

示例:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

设置完成后,可以用上面的命令进行查看

about_Execution_Policies的更多相关文章

  1. vue : 无法加载文件 C:\Users\lihongjie\AppData\Roaming\npm\vue.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 htt ps:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。 所在位置 行:1 字符: 1 + vue init webpack vue_p

    以管理员方式打开powershell 运行命令:set-ExecutionPolicy RemoteSigned 出现: 执行策略更改执行策略可帮助你防止执行不信任的脚本.更改执行策略可能会产生安全风 ...

  2. node_modules/.bin/babel : 无法加载文件 D:\node\node_project\es6\node_modules\.bin\babel.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.co m/fwlink/?LinkID=135170 中的 about_Execution_Policies。

    刚入门es6,遇到上面问题,然后 解决方案: 以管理员身份运行vs code执行:get-ExecutionPolicy,显示Restricted,表示状态是禁止的执行:set-ExecutionPo ...

  3. vue : 无法加载文件 C:\Users\ui61895076\AppData\Roaming\npm\vue.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。

    说白了就是这个编辑器不能用罢了 执行以下代码 1.鼠标右击以管理员身份运行vscode; 2. 执行:get-ExecutionPolicy,显示Restricted,表示状态是禁止的; 3. 执行: ...

  4. [SharePoint] SharePoint 错误集 2

    1 Run command “New-SPConfigurationDatabase" Feature Description: error message popup after run ...

  5. ASP.NET5 MVC6入门教学之一(自己动手)

    等待微软开源大动作已经好几年了,终于ASP.NET 5发布了.今天给新手们写一个简单地教程,教你认识一下ASP.NET5 MVC6 1.安装kvm 首先,你需要以管理员权限打开cmd,执行如下的脚本: ...

  6. powershell命令大全

    Name Category Synopsis ---- -------- -------- ac Alias Add-Content asnp Alias Add-PSSnapin clc Alias ...

  7. Windows PowerShell:管理服务器

    一.概述 Cmdlets 用于服务器的管理方面主要体现在4个方面:服务.日志.进程.服务器管理器. 1.服务 •  Get-Service.查看某个服务的属性. •  New-Service.创建一个 ...

  8. PowerShell: 如何解决File **.ps1 cannot be loaded because the execution of scripts is disabled on this sy

    PowerShell 默认不允许执行*.ps1脚本文件.运行ps1文件会得到下面的错误: File C:\Temp\Test.ps1 cannot be loaded because the exec ...

  9. PowerShell 远程管理之 about_Remote_Troubleshooting

    主题 about_Remote_Troubleshooting 简短说明 说明如何解决 Windows PowerShell 中的远程操作的问题. 详细说明 本节描述您在使用 Windows Powe ...

随机推荐

  1. yii Html中的a标签使用

    1.use yii\helpers\Html; <?php echo Html::a('编辑',['edit','id'=>$info['goods_id']])?> 2.有确认框的 ...

  2. Bonbo Git Server

    Install This page covers simple Bonobo Git Server installation. Be sure to check prerequisites page ...

  3. ipseccmd命令解析

    IPSec 首先需要指出的是,IPSec和TCP/IP筛选是不同的东西,大家不要混淆了.TCP/IP筛选的功能十分有限,远不如IPSec灵活和强大.下面就说说如何在命令行下控制IPSec. XP系统用 ...

  4. linux设备驱动归纳总结(八):3.设备管理的分层与面向对象思想【转】

    本文转载自:http://blog.chinaunix.net/uid-25014876-id-110738.html linux设备驱动归纳总结(八):3.设备管理的分层与面向对象思想 xxxxxx ...

  5. Makefile,如何传递宏定义DEBUG【转】

    转自:http://blog.csdn.net/linuxheik/article/details/8051598 版权声明:本文为博主原创文章,未经博主允许不得转载. Makefile,如何传递宏定 ...

  6. Linux 中open系统调用实现原理【转】

    转自:http://blog.chinaunix.net/uid-25968088-id-3426026.html 目录 OPEN系统调用过程 Open在内核里面的入口函数时sys_open Sys_ ...

  7. flex mx组件和s组件的字体兼容性不一致

    <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="ht ...

  8. 兼容IE, Chrome的ajax function

    gAjax.js var gAjax = (function () { /* paramObj:{ url: request url, method: GET or POST, encode: cha ...

  9. Positional parameter are considered deprecated; use named parameters or JPA-style positional parameters instead.

    这行代码: List<Cat> catList =session.createQuery("from Cat p where p.name.first_name=?") ...

  10. “wsimport -keep ”生成客户端报错“Use of SOAP Encoding is not supported.”

    本来想用 “wsimport -keep ” 生成客户端,结果报错“Use of SOAP Encoding is not supported.” 应该是缺jar包, 闲麻烦就发现了百度经验上的 这个 ...