microsoft / CSS-Exchange

Exchange Server support tools and scripts
MIT License
1.21k stars 332 forks source link

[Issue] Invoke-WebRequestWithProxyDetection fails on PowerShell 7 when -OutFile is not specified #2066

Open bill-long opened 2 months ago

bill-long commented 2 months ago

Describe the issue

$OutFile is an optional parameter in the Invoke-WebRequestWithProxyDetection shared function:

image

Even if it is not provided, we add it to the parameters and call Invoke-WebRequest:

image

Windows PowerShell allows this:

image

PowerShell 7 does not:

image