OfficeDev / Office-IT-Pro-Deployment-Scripts

A collection of useful PowerShell scripts to make deploying Office 2016 and Office 365 ProPlus easier for IT Pros and administrators. If you have any feature requests or ideas for future scripts please add the idea to the issues list in this repository
http://officedev.github.io/Office-IT-Pro-Deployment-Scripts
MIT License
882 stars 840 forks source link

Access Internet through proxy #286

Open fjuhasz opened 6 years ago

fjuhasz commented 6 years ago

Hello, To be able to access the internet through the default system proxy using default credential I modified the function Get-ChannelXml() like this:

function Get-ChannelXml() { ....... if (!(Test-Path -Path $XMLFilePath)) { $webclient = New-Object System.Net.WebClient $webclient.Proxy = [System.Net.WebRequest]::DefaultWebProxy $webclient.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials $XMLFilePath = "$env:TEMP/ofl.cab" $XMLDownloadURL = "http://officecdn.microsoft.com/pr/wsus/ofl.cab" $webclient.DownloadFile($XMLDownloadURL,$XMLFilePath) } ..........

Just getting familiar with Git so not really ready to commit directly.

Best Regards, Feri