Not clear if we should fix this or just let it continue to work this way. In PS7 we will never try to use a proxy. This apparently didn't cause an issue for customers running CVE-2023-23397.ps1. I know we had some using PS7 when running against Exchange Online.
Describe the issue
The Confirm-ProxyServer shared function always fails on PowerShell 7. Run any script with -Verbose and observe:
On PowerShell 7, this line throws, so we always end up in the catch:
GetSystemWebProxy() is deprecated and there is a new way to do this: https://github.com/dotnet/runtime/issues/24756#issuecomment-519618435
However, that doesn't work in Windows PowerShell.
Not clear if we should fix this or just let it continue to work this way. In PS7 we will never try to use a proxy. This apparently didn't cause an issue for customers running CVE-2023-23397.ps1. I know we had some using PS7 when running against Exchange Online.