Skip to content

Method invocation failed because [System.Net.Http.HttpResponseMessage] does not contain a method named 'GetResponseStream' #8

Description

@florian-obradovic

Hi,

thanks for the script which I used in the past successfully.

Today on a Windows 11 23H2 machine I ran into this error:
CleanShot 2024-10-16 at 11 56 43@2x

Method invocation failed because [System.Net.Http.HttpResponseMessage] does not contain a method named
'GetResponseStream'.
At C:\Users\floriano\Downloads\Test-IntuneFirewallRules.ps1:1130 char:7
+       $errorResponse = $ex.Response.GetResponseStream()
+       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MethodNotFound
$PSVersionTable
Name                           Value
----                           -----
PSVersion                      5.1.22621.4249
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.22621.4249
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions