I have this code that works perfect. Get-Process | Where-Object {$_.Name –eq "iexplore"} | Foreach-Object { $_.CloseMainWindow() | Out-Null } | stop-process –force My issue is what if I have multiple instances of iexplore.exe running? how do you account for that?