1

My goal is to display the (default) browser and open a specific URL on a remote session.

1 Create PSSession on a remote computer => OK

$computerName = "yannTPI-1"

$credential = get-credential

$session = new-PSSession -computerName $computerName -credential $credential

2 Run a script => OK

invoke-command -session $session -filePath $file

3 On that script... Open browser (many way...)

[System.Diagnostics.Process]::Start("http://stackoverflow.com")

start http://stackoverflow.com

And it works, under processes I can see a process corresponding to my browser. On my remote computer I'm connected with another account that the one I use to connect to it with PSSession. So it does not display as it is not the same User Name.

How can I force the display of the browser to another user ?

Sorry english is not my mother tongue, hope I'm clear enaugh.

4

3 回答 3

0

我尝试了我想做的安静的事情:

psexec -d "c:\program files\internet explorer\iexplore.exe"

IE 启动但窗口全黑 - 我需要添加语法 -i [UserName/Pwd]

我还发现: 不幸的是,当您使用特定的用户帐户时,PsExec 会将凭据以明文方式传递给远程工作站,从而将凭据暴露给碰巧“监听”的任何人。 资料来源:PsExec 安全 -i

我还尝试了 WM,但出现了很大的图形问题。(Win7)

无论如何,即使我能够正确打开浏览器,有没有办法打开特定的 URL?如果没有,我不会再尝试。

资料来源:Windows Systernals PsExec

于 2012-05-15T09:07:39.647 回答
0

你不能。在 PowerShell 远程处理和 WMI 远程处理中无法进行远程交互会话。如果这是您需要做的事情,您应该使用 PSExec!

于 2012-05-15T06:32:05.397 回答
0

psexec.exe \machinename -u DOMAIN\username -i -d "c:\program files\internet explorer\iexplorer.exe" http://www.webpage.com

这将显示在登录用户的当前 shell 中。

于 2014-10-15T14:58:42.300 回答