title: Powershell V3 - Click on Web Page Login Button
body: <p>Powershell noob here, it seems like this should be easy but I can't figure it out.  I'm trying to have my script click on a login button on the home page of a brokerage:</p>
  
  <pre><code>$login = Invoke-Webrequest -uri http://www.foliofn.com -sessionvariable fol
  $login.links
  </code></pre>
  
  <p>The third link is the login button, which when clicked brings up the login form:</p>
  
  <pre><code>innerHTML : &lt;I class=icon-lock&gt;&lt;/I&gt;Login 
  innerText : Login 
  outerHTML : &lt;A class="btn btn-small headerloginlink" href="/servlets/ProcessAction?identifier=loginFormEntry&amp;amp;click1=Login"&gt;&lt;I class=icon-lock&gt;&lt;/I&gt;Login &lt;/A&gt;
  outerText : Login 
  tagName   : A
  class     : btn btn-small headerloginlink
  href      : /servlets/ProcessAction?identifier=loginFormEntry&amp;amp;click1=Login
  </code></pre>
  
  <p>How do I "click" this using the invoke-webrequest method?  Do I need to post somehow (although this is not a form, just a link).</p>
  
  <p>I know I can do it using ie.document.getelementsbyTagName to select this element and then use click(), but I can't figure out how to do it in V3 without using DOM (if that's the right way to say it).</p>