Get all open IE windows

Welcome Forums General PowerShell Q&A Get all open IE windows

This topic contains 1 reply, has 2 voices, and was last updated by

Senior Moderator
2 weeks, 3 days ago.

  • Author
  • #180705

    Topics: 1
    Replies: 0
    Points: 12
    Rank: Member

    Hello everyone,

    I´m pretty new to PowerShell and trying to build a script to run the InternetExplorer as another user and controll the IE through the PS.

    I´m stuck at getting the open IE windows of ALL users. The following lines should get me the open windows of my users and the ability to control the IE Session. But it shows only the windows of my logged-in user, not the other ones.

    $Shell = New-Object -Com Shell.Application
    $Application = $Shell.Windows()

    while (!$ie.application) {
    $ie = $Application | ?{$_.LocationName -like '**'; Write-Host "Laden..."}
    $doc = $ie.Document
    sleep -Seconds 4

    When trying to run the code above as one of the new local users in powershell, I´m getting  "access denied" errors for $, even though the users are all in the admin-group.

    What I need is a way to control the open IE Sessions of my other local users. I would be very gratefull if anyone can give me a hint.


    Thanks in advance!


  • #180977

    Senior Moderator
    Topics: 8
    Replies: 1085
    Points: 3,651
    Helping Hand
    Rank: Community Hero

    Curious to know, Why would you need to control the IE of other users ?

You must be logged in to reply to this topic.