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. [tp3.2.1]让默认页面: 加载Home模块的Index控制器;而让admin.php默认去加载Admin模块的Adminc控制器.

    QQ:让index.php默认加载Home模块的Index控制器;而让admin.php默认去加载Admin模块的Adminc控制器.AA:复制index.php命名为admin.php复制(新建)A ...

  2. 指针二次释放(_BLOCK_TYPE_IS_VALID)

    [1]_BLOCK_TYPE_IS_VALID是什么错误? (1)最简单的示例代码如下: void main() { ); delete pA; delete pA; } (2)运行后崩溃截图如下: ...

  3. [转]bit与byte

    本文为转载,感谢博主的分享.原文地址:http://www.cnblogs.com/flyme/archive/2011/08/25/2153596.html bit意为“位”或“比特”,是计算机运算 ...

  4. 关于 MySQL LEFT JOIN 你可能需要了解的三点

    即使你认为自己已对 MySQL 的 LEFT JOIN 理解深刻,但我敢打赌,这篇文章肯定能让你学会点东西! ON 子句与 WHERE 子句的不同 一种更好地理解带有 WHERE ... IS NUL ...

  5. MySQL5.5半同步模式

    MySQL5.5支持半同步的复制模式,什么是半同步的? 1. MySQL5.5之前的Master-SLave的复制模式是异步的,这里的文档有详细的说明;

  6. Linux的视频编程(V4L2编程)【转】

    本文转载自:http://blog.csdn.net/tommy_wxie/article/details/11472073 一.什么是video4linuxVideo4linux2(简称V4L2), ...

  7. 【python cookbook】【数据结构与算法】3.保存最后N个元素

    问题:希望在迭代或是其他形式的处理过程中对最后几项记录做一个有限的历史记录统计 解决方案:选择collections.deque. 如下的代码对一系列文本行做简单的文本匹配操作,当发现有匹配时就输出当 ...

  8. windows cmd color setup

    设置颜色的话,一般可定会有foreground和background color设置:(其实color /?直接看一下就好了) Color Background Foreground Black 0 ...

  9. HttpContext.Current.Cache在控制台下不工作

    说明: Cache 类不能在 ASP.NET 应用程序外使用.它是为在 ASP.NET 中用于为 Web 应用程序提供缓存而设计和测试的.在其他类型的应用程序(如控制台应用程序或 Windows 窗体 ...

  10. struts2上传

    注意事项:文件名必须是:文件域+FileName,如: // 封装上传文件域的属性 private File uploadImage; // 封装上传文件名的属性 private String upl ...