Ari*_*Ari 5 script powershell path windows-8
我将常用的 powershell 脚本存储在%USERPROFILE%\Bin
. 我创建了一个USER_BIN
环境变量,我PATH
通过Control Panel > System and Security > System > Advanced system setting > Environment Variables
.
当我在cmd 或 powershell 提示符中输入存储在Bin
, 即中的脚本的名称时,my-script.ps1
我收到消息my-script.ps1 : The term 'my-script.ps1' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
如果我提供完整路径,即C:\Users\Ari\Bin\my-script.ps1
脚本工作正常。
归档时间: |
|
查看次数: |
7428 次 |
最近记录: |