I have an entire code file that works flawlessly on a PC. I brought it over to another one, and it busted. I used this snippet, and the output is just blank, it's not getting anything from the object. The browser does load the page though.
# Create the IE com object
"Lauching IE process..."
$ie = new-object -com InternetExplorer.Application
$ie.visible = $true
# Navigate to the login page
"Opening $loginPage"
$ie.navigate($loginPage)
"Waiting for page to load..."
# Wait for the page to finish loading
do {sleep 2} until (-not ($ie.Busy))
sleep 2
$ie.document.body.innerHTML
I found some references to IE security models, running as Admin, etc, and fiddled with it a bit.
- Script doesn't work if I run it as Administrator
- I've disabled as much IE security as possible
- Downgraded from IE 11 to IE 9
Still no luck.
Any suggestions?
Thanks!