【问题标题】:How to execute .exe file found on remote windows using OS Process Sampler in jmeter如何使用 jmeter 中的 OS Process Sampler 执行在远程窗口上找到的 .exe 文件
【发布时间】:2019-07-14 19:03:11
【问题描述】:

我是 Jmeter 新手,我需要运行远程 Windows 机器上存在的可执行文件,我使用了 OS 采样器请求,但我不知道如何让它连接到远程机器

【问题讨论】:

  • 欢迎来到本站!请提供有关您如何尝试解决该问题的更多详细信息。特别是发布您尝试使用的任何相关代码以及您无法继续的位置/方式。请注意,可能已经有信息可以帮助您入门,例如:stackoverflow.com/questions/10606680/…

标签: jmeter


【解决方案1】:

有两种选择:

  1. 使用PsExec 喜欢:

    • 命令:`cmd.exe'
    • 第一个参数:/c
    • 第二个参数:`/path/to/psexec.exe \your-remote-machine -u username -p password -c /path/to/file.exe
  2. 使用Windows Powershell Remoting

    • 命令:C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
    • 第一个参数:$password = ConvertTo-SecureString -String ${password} -AsPlainText -Force; $credentials = new-object -typename System.Management.Automation.PSCredential -argumentlist "${username}",$password; Invoke-Command -Computer ${host} -cred $credentials -scriptBlock { /path/to/file.exe }

更多信息:How to Run External Commands and Programs Locally and Remotely from JMeter

【讨论】:

    猜你喜欢
    • 2013-09-03
    • 1970-01-01
    • 2016-11-05
    • 1970-01-01
    • 2018-06-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多