title: Powershell and Microsoft Edge Automation
body: <p>I am trying to create a script that automatically opens Microsoft Edge into developer mode, and performs a bing search in the existing tab.</p>
  <p>I have managed to get as far as starting Edge and placing the tab into developer mode, however if ITry and add commands to complete a bing search it opens a secondary tab, which is not in developer mode.</p>
  <p>My goals are-
  Opens MSEDGE as a maximised window
  -Enables Developer Mode Options in the current tab (F12) keystroke
  -Completes a bing search in the current tab (for argument sake &quot;https://www.bing.com/search?q=1&quot; )</p>
  <p>My code so far consists of-</p>
  <pre><code>&amp; &quot;C:\Program Files  (x86)\Microsoft\Edge\Application\msedge.exe&quot; -ArgumentList --profile-directory=&quot;Profile 3&quot;
  Sleep 5 
  $wshell = New-Object -ComObject wscript.shell;
  $wshell.AppActivate('Google - Microsoft Edge') 
  $wshell.SendKeys('{F12}')
  </code></pre>
  <p>Any help is very much appreciated.</p>
  <p>Thanks
  ElDaTrain</p>