title: Accessing element of a webpage using powershell?
body: <p>I am writing a script to access the highlighted elements using a powershell script.<a href="https://i.stack.imgur.com/yx2mv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yx2mv.png" alt="enter image description here"></a></p>
  
  <p>I have tried the below code. </p>
  
  <pre><code>$ie = New-Object -ComObject InternetExplorer.Application
  $ie.Visible = $true
  $ie.navigate("http://jenkins-  ny.ciqdev.com/job/WebOperations/job/Tools/job/IIS%20Executing%20Requests/build?delay=0sec");
  ($ie.document.getElementsByName("servers")).value = "laser"
  </code></pre>
  
  <p>Can someone please correct me, where am i going wrong ?</p>
  
  <p>HTML code for the page:</p>
  
  <pre><code>&lt;div description="Which servers to run on" name="parameter"&gt;
  
  &lt;input name="name" value="Servers" type="hidden"&gt;
  
  &lt;select name="value" multiple="multiple" size="12"&gt;
  
  &lt;option value="a"&gt;a&lt;/option&gt;
  &lt;option value="b"&gt;b&lt;/option&gt;
  &lt;option value="c"&gt;c&lt;/option&gt;
  &lt;option value="d"&gt;d&lt;/option&gt;
  &lt;option value="e"&gt;e&lt;/option&gt;
  
  &lt;/select&gt;
  
  &lt;/div&gt;
  
  &lt;div description="Which tiers to run on? Select none for all" name="parameter"&gt;
  
  &lt;input name="name" value="Tiers" type="hidden"&gt;
  
  &lt;select name="value" multiple="multiple" size="11"&gt;
  
  &lt;option value="f"&gt;CIQDotNetPool&lt;/option&gt;
  &lt;option value="g"&gt;MachTPool&lt;/option&gt;
  &lt;option value="h"&gt;CIQAppServerRootPool&lt;/option&gt;
  &lt;option value="i"&gt;SessionlessAppPool&lt;/option&gt;
  &lt;option value="j"&gt;CapitalIQ&lt;/option&gt;
  
  &lt;/select&gt;
  
  &lt;/div&gt;
  </code></pre>