Basic Auth & Internet Explorer Automation in Powershell

1

I'm in the need of automating an administration task of a web application. I used Powershell and the InternetExplorer.Application ComObject to accomplish this task. The relevant part is to navigate to a webpage and gather all relevant links, navigate there and click on a button on those pages. Now, one of the administrators wants to add Basic Auth to those pages, but I can't figure out, how to get this working from powershell.

Has anyone any ideas, how to use Basic Auth here? Searching google, I'm only seeing tips like "use WebClient instead of IE". Also, the following won't work:

$url = "http://"+$user+":"+$pass+"@example.com/admin/something"
$ie.navigate($url)

Elvith

Posted 2011-05-27T14:23:21.737

Reputation: 326

Answers

0

Can you use integrated NTLM authentication instead of basic auth? I have used the COM object automation and PowerShell before with NTLM auth and it works like a champ.

Goyuix

Posted 2011-05-27T14:23:21.737

Reputation: 6 021

On my workstation, I'm logged in with user "myUser", but on the server, I'll have to use "anotherAdminUser" - If I've understood NTLM right, it uses your current username. So I don't think, this could help :'(. Please correct me, when this should work anyway. – Elvith – 2011-05-31T07:47:24.160