Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Problem accessing localhost in powershell

$
0
0

I have two system that are identical.  Both run windows 7 pro 64bit.  I have a script that I run on both systems.  It works on one system but not the other.  The script is as follows:

$ie = new-object -com "InternetExplorer.Application"
$ie.navigate("http://localhost:8129/default.aspx")
#$ie.visible = $true
$ie.visible = $false
$b=0
$doc = $ie.document

On one system it opens the page and $doc contains the correct data.  Also the window is not visible.  ON the other system it opens the page and the window is visible.  The $doc has no data.  If on the system that fails.  I navigate to www.google.com.  I does not display the window and $doc contains valid data.

RAC


Viewing all articles
Browse latest Browse all 21975

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>