PowerShell 使用 Invoke-Command 创建 IE 的远程实例

标签 powershell powershell-2.0 powershell-remoting

我正在尝试通过 PowerShell 远程生成 IE 实例。

Invoke-Command -computername foo -scriptblock {
    $ie = New-Object -ComObject InternetExplorer.Application
    $ie.Visible = $true
    $ie.Navigate("http://duckduckgo.com")
}

它生成实例,我可以在进程中看到它,但它对用户不可见。我做错了什么?

最佳答案

我认为你没有做错什么。

据我所知,通过 PSRemoting 与远程用户的桌面交互是不可能的。

如果 Powershell 不能做到这一点,微软(以前是 Sysinternal 的)工具 PSEXEC 可以做到这一点(看看 -i 参数)。

关于PowerShell 使用 Invoke-Command 创建 IE 的远程实例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10559200/

相关文章:

powershell - 如何单独获取 registryKey 名称而不是完整的注册表键路径?

powershell - 远程命令中的最大数据大小

python - 仅使用 python 的 New-PSSession(无子进程模块)

azure - 有没有办法以完整模式部署 "nested"或 "tiered"资源(即服务总线队列)或达到等效结果?

powershell - 什么是用于 checkin / checkout 文件的好的 Powershell 动词?

powershell - Java keytool.exe powershell 包装器不会抑制标准错误

PowerShell 远程处理 $Using 变量范围

powershell - 用于在管道中跨数据集循环的 Azure PowerShell 代码

Powershell Remedy ARQ 文件,可能存在编码问题

Powershell - Get-ADOrganizationalUnit 组