Get-ExecutionPolicy -List

Set-ExecutionPolicy -Scope CurrentUser AllSigned 

Policies:

Restricted/AllSigned/RemoteSigned/Unrestricted/Bypass/Undefined

Scopes:

Process/CurrentUser/LocalMachine

process仅对当前进程有效,可以用作临时使用,例如:

Set-ExecutionPolicy Bypass -Scope Process -Force; npm-windows-upgrade

参考:

https://docs.microsoft.com/zh-cn/powershell/module/microsoft.powershell.security/get-executionpolicy?view=powershell-6

https://docs.microsoft.com/zh-cn/powershell/module/microsoft.powershell.security/set-executionpolicy?view=powershell-6

https://docs.microsoft.com/zh-cn/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-6

https://chocolatey.org/install

设置powershell ExecutionPolicy的更多相关文章

  1. Powershell ExecutionPolicy 执行策略

    简单说明 powershell对于脚本的执行有着严格的安全限制 Get-ExecutionPolicy -List #查看当前的执行策略 Set-ExecutionPolicy -Scope Curr ...

  2. powershell学习

    PowerShell 调试器 在开始运行处,输入powershell ISE回车即可 PowerShell 与操作系统版本 powershell在windows server 2008上自带,但最好在 ...

  3. PowerShell 远程管理之 about_Remote_Troubleshooting

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

  4. win8.1点击“更改电脑设置”无反应(闪退)

    系统:win8.1 专业版 症状:win键+C → 设置 → 更改电脑设置,无反应. 尝试办法: 1.SFC /scannow扫描修复,扫描出错误但无法修复.因为曾经为了节省空间,用DISM++清理了 ...

  5. python调用powershell、远程执行bat

    python调用本地powershell方法 1.现在准备一个简陋的powershell脚本,功能是测试一个IP列表哪些可以ping通: function test_ping($iplist) { f ...

  6. powershell(一)

    Windows powershell是一种命令行外壳程序和脚本环境,它内置在win7以上版本的操作系统中,使命令行用户和脚本编写者可以利用.NET Framework的强大功能.powershell程 ...

  7. Powershell基础之脚本执行

    Bat 这就是我们常用的Bat脚本,全名为批处理文件,脚本中就是我们在CMD中使用到的命令,这里提一个小问题:CMD的命令行执行命令的优先级是.bat > .exe,那么假如我放一个cmd.ba ...

  8. PowerShell攻击:nishang

    nishanhg 下载地址:https://github.com/samratashok/nishing   1.简介 nishang的使用是要在PowerShell 3.0以上的环境中才可以正常使用 ...

  9. PowerShell初探

    Windows PowerShell是一种命令行外壳程序和脚本环境,它内置在每个受支持的Windows版本中(Windows 7/Windows 2008 R2和更高版本),使命令行用户和脚本编写者可 ...

随机推荐

  1. node 图片上传功能

    node 代码: var http = require("http"); var express = require('express') app = express(), for ...

  2. vue基础——组件基础

    一.基本示例 这里有一个Vue组件的示例: // 定义一个名为 button-counter 的新组件 main.js Vue.component('button-counter', { data: ...

  3. ccttp图片处理过程

    1.python输出404的图片 #!/usr/bin/python # coding: utf-8 import psycopg2 import sys from datetime import * ...

  4. PostgreSql别名区分大小写的问题

    PostgreSql是区分大小写的,如果别名的大小不一致就会提示错误: SELECT * FROM ( SELECT cpi."product_item_id" "PRO ...

  5. scala --操作符和运算

    基本类型和操作 scala 的基本类型包括如下几种 数类型 ​ 整数类型 :Byte Short Int Long ​ 小数类型: Float Double 字符类型:Char 用'' 单引号包裹,是 ...

  6. mac版IDEA使用maven的问题

    在idea中执行maven碰到这个错误:invalid target release: 1.7.首先做了以下操作 1.查看$JAVA_HOME echo $JAVA_HOME /Library/Jav ...

  7. mysql 常用option

    [mysql 常用option] --host=host_name, -h host_name Connect to the MySQL server on the given host. --por ...

  8. jquery读取本地文件,Windows上报错。XMLHttpRequest cannot load xxx. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.k.cors.a.c

    问题: 测试报告,使用本地的json.txt文件,结果文件读取失败,报错如下: XMLHttpRequest cannot load xxx. Cross origin requests are on ...

  9. springboot CommandLineRunner

    @SpringBootApplicationpublic class Application implements CommandLineRunner { public static void mai ...

  10. web项目生成web.xml的两种方式

    做了很多的项目,今天着手写个小demo发现做web项目的时候还需要从别的地方去拷贝,那么如果没有地方可以拷贝,要怎么办呢?下边介绍三种方式生成web.xml文件. 一.maven项目情况:(STS版) ...