Download xml file using InternetExplorer.Application


i've been trying write ps logs onto website via internet explorer navigates xml file can download it. problem is, when link xml file activated, opens new tab xml file , unfortunately ie variable still points previous tab contains link xml file.

i've tried navigate url xml file once i've logged on 403 error.

can advise me how can reference new tab thanks

here's code i've been using:

$ie = new-object -comobject internetexplorer.application  #...  $xmlfeedlink     foreach ($child in $doc.getelementbyid("id").getelementsbytagname('a')) {      $xmlfeedlink =   $child         #i can't array reference work using loop      break } $xmlfeedlink.click()  $ie.document.execcommand("saveas",0,$destinationfile) #saves page containing link , not xml file







i think aren't posting of code, , without sample of page you're on it's hard offer advice.  what instead of $xmlfeedlink.click(), behave according number of possible parameters force tab, find href of xml feed , $ie.navigate it.  then saveas command work.

i hope post has helped!



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

server manager error: ADAM.events.xml could not be enumerated.

Cannot access Anywhere Access using domain name?

WMI Failure: Unable to update Local Resource Group