title: Powershell website automating button click on login
body: <p>So I'm new to powershell. I've built a few scripts for fun but got stuck on one that I don't seem to be able to figure out. I'm trying to automate the clicking of the "Continue" button but don't know what to do. I have tried everything I can think of. Any ideas?</p>
  
  <pre><code>$username='username' 
  $password='password'
  
  $ie = New-Object -ComObject 'internetExplorer.Application'
  $ie.Visible= $true
  $ie.Navigate("https://www.ksl.com/public/member/signin?login_forward=%2F")
  
  while ($ie.Busy -eq $true){Start-Sleep -seconds 1;}   
  
  $usernamefield = $ie.Document.getElementByID('memberemail')
  $usernamefield.value = $username
  
  $passwordfield = $ie.Document.getElementByID('memberpassword')
  $passwordfield.value = $password
  
  $Link=$ie.Document.getElementsByTagName("input") | where-object {$_.type -eq "continue"}
  $Link.click()
  </code></pre>