title: PowerShell script to check which browsers are running
body: <p>I would like to PowerShell script to check the open browsers on the computer, for this I was thinking to use &quot;Get-Process&quot; so it looks like that</p>
  <pre><code>if (Get-Process iexplore) { $iexplore = &quot;Internet Explorer; &quot; } else { $iexplore = &quot;Internet Explorer is not running&quot; }
  if (Get-Process MicrosoftEdge) { $MicrosoftEdge = &quot;Microsft Edge; &quot; } else { $MicrosoftEdge = &quot;Microsft Edge is not running&quot; }
  if (Get-Process msedge) { $msedge = &quot;Microsft Edge(Chromium based); &quot; } else { $msedge = &quot;Microsft Edge Chromium based is not running&quot; }
  if (Get-Process chrome) { $chrome = &quot;Google Chrome; &quot; } else { $chrome = &quot;Google Chrome is not running&quot; }
  if (Get-Process firefox) { $firefox = &quot;Firefox; &quot; } else { $firefox = &quot;Firefox is not running&quot; }
  </code></pre>
  <p>However, it is working until we do not consider Microsoft browsers as the process may still be in the background even if the browser is not opened. Is there a way to make sure that the result is correct and it is actually checking if the specific browser is opened?</p>