Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在PowerShell中运行EXE_Powershell - Fatal编程技术网

在PowerShell中运行EXE

在PowerShell中运行EXE,powershell,Powershell,如何从PowerShell控制台“执行”exe 我知道在CMD中我可以输入exe的名称并运行它,但这在PowerShell上不起作用 在目录中有一个名为b2c.exe的exe,我想运行它 我要运行的命令示例: b2c获取用户 b2c帮助 b2c更新用户a80a99a7-b018-423f-90fc-d9a30e5dc7ea……\usertemplate-update-org-id.json cmd提示符中的工作示例,以及来自PowerShell的错误消息: 我认为powershell的搜索

如何从PowerShell控制台“执行”exe

我知道在CMD中我可以输入exe的名称并运行它,但这在PowerShell上不起作用

在目录中有一个名为
b2c.exe的exe,我想运行它

我要运行的命令示例:

  • b2c获取用户
  • b2c帮助
  • b2c更新用户a80a99a7-b018-423f-90fc-d9a30e5dc7ea……\usertemplate-update-org-id.json
cmd提示符中的工作示例,以及来自PowerShell的错误消息:


我认为powershell的搜索路径中没有当前文件夹,请尝试:

.\b2c

我认为powershell的搜索路径中没有当前文件夹,请尝试:

.\b2c


Powershell绝对不会在搜索路径中包含当前目录;出于安全考虑,这是故意的。Powershell绝对不会在搜索路径中包含当前目录;出于安全考虑,这是故意的。
&
运算符和引号在这里是不必要的,因为可执行文件的路径/文件名不包含引号。(这没有什么坏处,但也不是必需的。)此处不需要
&
运算符和引号,因为可执行文件的路径/文件名不包含引号。(这不痛,但也不是必要的。)