I have an https website I need to download a file from, but nothing I do seems to work. I can navigate to the website by using the "internetexplorer.application" and log in successfully. But I cannot overcome the "save as" dialog that pops up at the bottom of the screen after l navigate to the file I want to download. I also cannot get the standard "downloadfile" command to work. Can someone please help me get the below pseudo code to be actual code. I am using powershell 2.0. Thanks.
$username = "user"
$url = "https://www.website.com/get.jsp?Code=TEXT"
$web = New-Object System.Net.WebClient
Thank you in advance,
At a glance, the code looks fine to me. Since you're really using .NET, and not PowerShell, you might try looking in StackOverflow.com since there's a lot more .NET programmers hanging out there. For example, http://stackoverflow.com/questions/146973/powershell-script-to-download-file-having-trouble-setting-up-a-secure-connectio?s=1|0.1730 seems to discuss a similar problem. Because PowerShell v2 doesn't really make it easy to write callback handlers, you might not be able to do what you want.
You must be logged in to reply to this topic.