diff --git a/HPWarranty/Private/Invoke-HPEntSOAPRequest.ps1 b/HPWarranty/Private/Invoke-HPEntSOAPRequest.ps1 index 8c7bf86..2344f16 100644 --- a/HPWarranty/Private/Invoke-HPEntSOAPRequest.ps1 +++ b/HPWarranty/Private/Invoke-HPEntSOAPRequest.ps1 @@ -71,6 +71,9 @@ Function Invoke-HPEntSOAPRequest { $soapWebRequest.ContentType = 'text/xml; charset=utf-8' $soapWebRequest.Accept = 'text/xml' $soapWebRequest.Method = 'POST' + $proxy = [System.Net.WebRequest]::GetSystemWebProxy() + $proxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials + $soapWebRequest.Proxy = $proxy try { $SOAPRequest.Save( diff --git a/HPWarranty/Private/Invoke-HPIncSOAPRequest.ps1 b/HPWarranty/Private/Invoke-HPIncSOAPRequest.ps1 index d647324..d2873cc 100644 --- a/HPWarranty/Private/Invoke-HPIncSOAPRequest.ps1 +++ b/HPWarranty/Private/Invoke-HPIncSOAPRequest.ps1 @@ -39,6 +39,9 @@ Function Invoke-HPIncSOAPRequest { $soapWebRequest.ContentType = 'text/xml; charset=utf-8' $soapWebRequest.Accept = 'text/xml' $soapWebRequest.Method = 'POST' + $proxy = [System.Net.WebRequest]::GetSystemWebProxy() + $proxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials + $soapWebRequest.Proxy = $proxy try { $SOAPRequest.Save(