3

I'm trying to spawn an IE instance remotely via PowerShell.

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

It spawns the instance, I can see it in processes but it doesn't become visible to to the user. What am I doing wrong?

JPBlanc
  • 70,406
  • 17
  • 130
  • 175
baudtack
  • 29,062
  • 9
  • 53
  • 61

1 Answers1

2

I think you are not doing anything wrong.

As far as I understand, It's just not possible to interact with a remote user's desktop through PSRemoting.

If Powershell cannot do this, Microsoft's (previously Sysinternal's) tool PSEXEC can do this (take a look at the -i parameter).

JPBlanc
  • 70,406
  • 17
  • 130
  • 175