News, tips, advice, support for Windows, Office, PCs & more
Home icon Home icon Home icon Email icon RSS icon

We're community supported and proud of it!

  • PS5 vs PS7 – Invoke-WebRequest

    Home Forums Developers, developers, developers DevOps Lounge PS5 vs PS7 – Invoke-WebRequest

    Viewing 1 reply thread
    • Author
      Posts
      • #2252664
        RetiredGeek
        AskWoody MVP

        Hey Y’all,

        I’ve come up upon one I just can’t figure out.

        Here’s the code:

        $IWRArgs = @{URI = "https://www.askwoody.com/"
                       UseBasicParsing = $True
                       ErrorAction     = "Stop"
                      }
             $WebResponse = Invoke-WebRequest @IWRArgs
        
        #Note: Just using - $WebRespose = Invoke-WebRequest -URI https://www.askwoody.com/
        #      suffers from the same problem
        

        In PS5 $WebResponse.Images.Count = 39
        In PS7 $WebResponse.Images.Count = 0

        It’s a head scratcher for sure.

        I’ve found several instances where PS7 does NOT act like PS5. Usually PS5 is more lenient then PS7 and correcting the PS5 code makes it run the same on both platforms. However, Not so with this one!

        Ideas? 😎

        May the Forces of good computing be with you!

        RG

        PowerShell & VBA Rule!
        Computer Specs

      • #2252673
        RetiredGeek
        AskWoody MVP

        Hey Y’all,

        I found out that this is a reported bug! A fix has been identified but I don’t know when it will be available. 😎

        May the Forces of good computing be with you!

        RG

        PowerShell & VBA Rule!
        Computer Specs

        1 user thanked author for this post.
    Viewing 1 reply thread

    Please follow the -Lounge Rules- no personal attacks, no swearing, no politics or religion.

    Reply To: PS5 vs PS7 – Invoke-WebRequest

    You can use BBCodes to format your content.
    Your account can't use Advanced BBCodes, they will be stripped before saving.