Use PowerShell Behind Proxy / PnP SharePoint Online Behind Proxy

To use PowerShell (Including PnP Connecting to Office 365) behind a proxy — use this line of code in your script:

[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials

I plucked it off the interwebs, but have since lost the URL to give proper credit.

Leave a Reply

Your email address will not be published. Required fields are marked *