title: How to get URL from Chrome in PowerShell
body: <p>I tried:</p>
  
  <pre><code>Add-Type -AssemblyName UIAutomationClient
  
  $chromes = Get-Process -Name chrome
  
  foreach ($chrome in $chromes) {
      if ($chrome.MainWindowHandle -eq [System.IntPtr]::Zero) {
          continue
      } else {
          $chrome.MainWindowHandle
      }
  
      $element = [System.Windows.Automation.AutomationElement]::FromHandle($chrome.MainWindowHandle)
      $condition = [System.Windows.Automation.PropertyCondition]::New([System.Windows.Automation.AutomationElement]::ClassNameProperty, "Chrome_OmniboxView")
  
      $edit = $element.FindFirst([System.Windows.Automation.TreeScope]::Subtree, $condition)
  
      $edit
  }
  </code></pre>
  
  <p><code>$edit</code> is <code>$null</code>.</p>
  
  <p>Chrome version ７５ in Japan.</p>