wmi 启动远程exe
时间: 2023-08-02 10:05:11 浏览: 107
可以使用 WMI (Windows Management Instrumentation) 来启动远程的 EXE 文件。以下是一个示例 PowerShell 脚本:
```powershell
$computerName = "RemoteComputerName"
$processName = "C:\Path\To\Your\Executable.exe"
$mc = [System.Management.ManagementClass]"\\$computerName\root\cimv2:Win32_Process"
$result = $mc.create($processName)
```
将 `RemoteComputerName` 替换为要启动 EXE 文件的远程计算机的名称,将 `C:\Path\To\Your\Executable.exe` 替换为要启动的 EXE 文件的路径。
请注意,要运行此脚本,您需要在远程计算机上具有管理员权限。
阅读全文
相关推荐







