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. 软件测试人员遇到发现的bug不能重现怎么办?

    软件测试人员遇到发现的bug不能重现怎么办?   刚刚进入测试的童鞋们,想必都遇到过提出的bug,开发要求重现之后,但是在系统上已经重现不了的情况吧. 那么碰到这样的情况,不管开发还是测试都很纠结,开 ...

  2. WebStorm下载安装

    下载地址:https://www.jetbrains.com/webstorm/ 注册码: http://idea.codebeta.cn

  3. Leetcode 306.累加数

    累加数 累加数是一个字符串,组成它的数字可以形成累加序列. 一个有效的累加序列必须至少包含 3 个数.除了最开始的两个数以外,字符串中的其他数都等于它之前两个数相加的和. 给定一个只包含数字 '0'- ...

  4. 七牛云成功通过 CMMI3 认证

    10 月 31 日,在上海七牛信息技术有限公司青岛会议室举行的 CMMI3 级认证结果发布会上,主任评估师王庆付老师和评估组向公司高层及参与评审的 EPG 成员及项目组成员郑重宣布:经过严格的现场审核 ...

  5. Ubuntu启用IPv6上google的方法

    Pv6就是我们通常所说的互联网协议,是TCP/IP的核心协议,那么在Linux下如何开启IPv6呢?下面以Ubuntu为例,给大家介绍下Ubuntu启用IPv6的方法. 方法: $sudo apt-g ...

  6. 最大和(codevs 1648)

    题目描述 Description N个数围成一圈,要求从中选择若干个连续的数(注意每个数最多只能选一次)加起来,问能形成的最大的和. 输入描述 Input Description 第一行输入N,表示数 ...

  7. LCA 在线倍增法 求最近公共祖先

    第一步:建树  这个就不说了 第二部:分为两步  分别是深度预处理和祖先DP预处理 DP预处理: int i,j; ;(<<j)<n;j++) ;i<n;++i) ) fa[i ...

  8. 【BZOJ1008】越狱(排列组合计数,容斥原理)

    题意: 思路: #include<cstdio> #include<cstdlib> #include<iostream> #include<algorith ...

  9. Wannafly挑战赛1

    地址:https://www.nowcoder.com/acm/contest/15#question A(树形dp) 分析 dp[i][0],dp[i][1]分别表示以i为根的子树中,有多少个点到i ...

  10. 学习日常笔记<day17>jdbc基础

    1.jdbc入门 1.1.jdbc定义 使用java代码发送sql语句的技术就是jdbc技术 1.2.使用jdbc发送sql前提 需要登录数据库服务器(数据库的IP地址,端口,数据库用户名,密码) / ...