https://4sysops.com/archives/use-powershell-to-execute-an-exe/

https://stackoverflow.com/questions/714877/setting-windows-powershell-path-variable#

临时添加

If, some time during a PowerShell session, you need to modify the PATH environment variable temporarily, you can do it this way:

$env:Path += ";C:\Program Files\GnuWin32\bin"

每次启动powershell的时候,自动添加

Changing the actual environment variables can be done by using the env: namespace / driveinformation. For example, this code will update the path environment variable:

$env:Path = "SomeRandomPath";

There are ways to make environment settings permanent, but if you are only using them from PowerShell, it's probably a lot better to use your profile to initiate the settings. On startup, PowerShell will run any .ps1 files it finds in the WindowsPowerShell directory under My Documents folder. Typically you have a profile.ps1 file already there. The path on my computer is

c:\Users\JaredPar\Documents\WindowsPowerShell\profile.ps1

add environment path to powershell的更多相关文章

  1. Unable to write inside TEMP environment path

    安装PostgreSQL 9:Unable to write inside TEMP environment path 注册表:regedit HKEY_CLASSES_ROOT\.vbs,设置默认为 ...

  2. Import user's Environment path into Linux cron task

    How to use "cron" to create scheduled task Minimum time cycle: 1 minute Use crontab -e edi ...

  3. add a path cgi-bin to asp.net mvc

    1.简单,但是会丢失请求数据 protected void Application_BeginRequest() { string url = HttpContext.Current.Request. ...

  4. 安装postgresql碰到Unable to write inside TEMP environment path

    搞了半天,原来是 AVAST搞的鬼,把原来注册表的键值改成它自己了.其实应该是 C:\Windows\System32\vbscript.dll The answer in the following ...

  5. powershell里添加对git的支持

    在powershell命令行里依次运行 1. (new-object Net.WebClient).DownloadString("http://psget.net/GetPsGet.ps1 ...

  6. XenDesktop 5 PowerShell SDK Primer – Part 2 – Creating Hypervisor Connections and Hosts

    One of the new changes that you will see in XenDesktop 5 is the configuration of hypervisor connecti ...

  7. windows cannot find powershell.exe windows 7

    This can happen when the environment variables are missing an entry for Powershell. $env:path must i ...

  8. Initializing a Build Environment

    This section describes how to set up your local work environment to build the Android source files. ...

  9. Powershell调用静态方法

    Powershell将信息存储在对象中,每个对象都会有一个具体的类型,简单的文本会以System.String类型存储,日期会以System.DateTime类型存储.任何.NET对象都可以通过Get ...

随机推荐

  1. HDU1754-I Hate It,线段数水题~~2016.4.11

    I Hate It                                                                                           ...

  2. [luoguP2461] [SDOI2008]递归数列(DP + 矩阵优化)

    传送门 本题主要是构造矩阵,我们只需要把那一段式子看成两个前缀和相减, 然后就直接矩阵连乘. 直接对那个k+1阶矩阵快速幂即可,注意初始化矩阵为单位矩阵,即主对角线(左上到右下)都为1其他都为0. 另 ...

  3. [NOIP2002] 提高组P1032 字串变换

    题目描述 已知有两个字串 A, B 及一组字串变换的规则(至多6个规则): A1 -> B1 A2 -> B2 规则的含义为:在 A$中的子串 A1 可以变换为 B1.A2 可以变换为 B ...

  4. Protobuf 完整解析 - 公司最常用的数据交互协议

    Google Protocol Buffer(简称 Protobuf)是一种轻便高效的结构化数据存储格式,平台无关.语言无关.可扩展,可用于通讯协议和数据存储等领域. 数据交互xml.json.pro ...

  5. ARM PPC 交叉编译环境搭建

    ARM: 1,下载cross-3.4.1.tar.bz2 2,在/usr/local目录下建立arm目录 3,将cross-3.4.1.tar.bz2拷贝到arm目录下 4,tar jxvf cros ...

  6. Java中的重写

    以下内容引用自http://wiki.jikexueyuan.com/project/java/overriding.html: 如果一个类从它的父类继承了一个方法,如果这个方法没有被标记为final ...

  7. Maven安装和手动安装jar到仓库

    1. 安装Maven 1.下载mvn到本地,解压. 2.新建系统变量MAVEN_HOME,值指向安装目录如D:\apache-maven-3.3.9 3.path变量中增加:%MAVEN_HOME%\ ...

  8. 分析PMT changed for the ROM:it must be downloaded.升级失败。

    应用场景描写叙述: 同样项目不同版本号(不同分支),使用Smart Phone Flash Tool工具交叉升级,出现PMT changed for the ROM;it must be downlo ...

  9. HTML的DIV如何实现垂直居中

    外部的DIV必须有如下代码 display:table-cell; vertical-align:middle;   这样可以保证里面的东西,无论是DIV还是文本都可以垂直居中

  10. js中window.onload 与 jquery中$(document.ready()) 測试

    js中window.onload 与 jquery中$(document.ready())差别,验证代码例如以下(调换js代码和Jquer代码书写顺序測试.执行结果一样.因此与代码书写位置没关系): ...