Proxy Authentication using logged on network credentials, works fine in Windows PowerShell
See original GitHub issueSteps to reproduce
[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
(Invoke-WebRequest -Uri 'https://google.com').StatusCode
Expected behavior
200
Actual behavior
Error message being thrown from network proxy
Authentication Required
You must be authenticated to access this URL.
Environment data
Name Value
---- -----
PSVersion 7.0.0-preview.3
PSEdition Core
GitCommitId 7.0.0-preview.3
OS Microsoft Windows 10.0.17763
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
This works fine on the same machine using Windows PowerShell but doesn’t work in PowerShell 6 or above.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:10
Top Results From Across the Web
Access web using Powershell and Proxy
I can't seem to get access to a webpage using Powershell. I keep getting a "(407) Proxy Authentication Required". I've tried many things....
Read more >Using PowerShell Behind a Proxy Server
In this article, we'll show you how to configure PowerShell to access the Web through a proxy server with authentication.
Read more >Bypass proxy for all web requests in Powershell Core
The following command will use the credentials of your domain account under which you're currently logged in to Windows: [System.Net.
Read more >Troubleshoot Azure AD connectivity issues
Verify proxy connectivity. To check whether the Azure AD Connect server is connecting to the proxy and the internet, use some PowerShell cmdlets ......
Read more >Troubleshooting Web Application Proxy
All errors are presented to the PowerShell user using standard PowerShell error ... Verify that AD FS is reachable and working properly.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@gabrielmccoll I tried with 7.1.1
It now works for me 🎉
It comes from .Net.