PS1 search for existing edge/opened link before opening
<# Powershell.exe -NoProfile -ExecutionPolicy Bypass -File "\\gal-arc01\T\Script\PS1\Edge-Open-Link-conditional\Edge-Open-Link-Conditional.ps1" -Link "https://planner.cloud.microsoft/webui/plan/6MwYXy_J30-C38ToHv9SxmUAGUaG/view/board?tid=94e13abb-51f9-4cae-9154-1dc424fb2c80" File: launch-conditional-Edge.ps1 Goal: - If Edge is not launched (no visible Edge window): open Link in a new window. - If Edge is launched AND the Link is already open in any tab: focus that tab (do nothing else). - If Edge is launched BUT the Link is NOT open: open Link in a new tab. Usage: powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\launch-conditional-Edge.ps1 -Link "https://..." Notes: - UI Automation may fail if Edge is elevated but this script isn't (or vice versa). Run at same elevation. - Tab scanning is best-effort; if UIA cannot read the address bar, script will open a new tab. #> # --- Parameter declaration --- param ( # Link to open if ...