2

我想在我的网络上为远程 pc 的特定文件夹运行句柄,以便知道哪些进程正在锁定文件夹。

试过:

handle /accepteula \\remotePcName\c:\myFolder

handle /accepteula \\remotePcName\User(name of the account)\c:\myFolder

和其他一些没有运气的组合

找不到匹配的句柄。

是否有可能做到这一点?为远程电脑运行句柄?

4

2 回答 2

0

你能试试这样吗:

c:\powershell\Tools\psexec.exe \\remotePcName C:\handle.exe c:\myFolder
于 2015-02-11T09:51:23.023 回答
0

如何使用调用命令远程执行“句柄”?

$serverName = 'serverName'
$pathtoCheck = 'C:\temp' # folder you want to check on the remote server.
$pathtoHandle = 'c:\temp\handle.exe' #location of handle.exe on the remote server.

Invoke-command -ComputerName $serverName -Scriptblock {
    param(
    [string]$handles,
    [string]$pathToCheck
    )
     "$handles /accepteula $pathToCheck" | Invoke-Expression 
    } -ArgumentList $pathtoHandle,$pathtoCheck
于 2015-02-13T15:24:20.100 回答