locked
How to open URL in background RRS feed

  • Question

  • Hi,

    I try to open an URL in background

    I tried that :

    $ie = new-object -com "InternetExplorer.Application"

    $ie.navigate("www.bing.com")

    It works ! But when I set my server url :

    $ie.navigate("192.168.167.132\test.html")

    the IE window appears !!!

    Can you help me ?

    Wednesday, May 24, 2017 10:47 AM

All replies

  • What exactly are you trying to do with the returned values? If you are simply trying to parse the content or check availability / response codes, then you could use the invoke-webrequest command:

    Invoke-WebRequest -URI "http://192.168.167.132/test.html"

    Maurice

    • Proposed as answer by Hello_2018 Thursday, May 25, 2017 7:30 AM
    Wednesday, May 24, 2017 11:25 AM
  • Hi,

    I try to open an URL in background

    I tried that :

    $ie = new-object -com "InternetExplorer.Application"

    $ie.navigate("www.bing.com")

    It works ! But when I set my server url :

    $ie.navigate("192.168.167.132\test.html")

    the IE window appears !!!

    Can you help me ?

    it doesn't appears in my PS 5.0.

    PS C:\share> $PSVersionTable

    Name                           Value
    ----                           -----
    PSVersion                      5.0.10586.117
    PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
    BuildVersion                   10.0.10586.117
    CLRVersion                     4.0.30319.34003
    WSManStackVersion              3.0
    PSRemotingProtocolVersion      2.3
    SerializationVersion           1.1.0.1

    Best regards,

    Andy


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Thursday, May 25, 2017 7:30 AM
  • Hi,
    Was your issue resolved? 
    If you resolved it using our solution, please "mark it as answer" to help other community members find the helpful reply quickly.
    If you resolve it using your own solution, please share your experience and solution here. It will be very beneficial for other community members who have similar questions.
    If no, please reply and tell us the current situation in order to provide further help.
    Best Regards,
    Andy

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, June 5, 2017 3:00 AM