KB – Windows Proxy configuration

Workspace ONE and Windows management are always complicated when using a proxy.

To avoid further misunderstandings I tested all five different scenarios and here are the results:

INETWINHTTPBITSINET+WINHTTPINET+BITSWINHTTP+BITS
HUB startyesyesYesyesyesYes
HUB worksyesnonoyesrestart required
Manual EnrollmentyesNo – *Works with INETNoyesyesNo  *Works with INET
WNS RegistrationyesNo – since no enrollmentNoyesyesNo – since no enrollment
WNS Pushyesyes (after enrollment)NoyesyesNo – since no enrollment
App Deploymentyesyes (after enrollment)NoyesyesNo – since no enrollment
App Deployment if no user is logged onyesyes (after enrollment)NoyesyesNo – since no enrollment
App status change in consoleyesNoNoyesyesNo – since no enrollment
FreestyleNot testedNot testedyesNot testedNo – since no enrollment
Different proxy configurations

How do you detect what kind of Windows proxy configuration you are using?

First, INET is the most common one. You can use a proxy the GUI to configure the proxy:

Windows settings for proxy

But also via registry in the current user hive:

SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings

Of course, the proxy is also configurable via Windows GPO. The setting is located in the user hive under:

User Configuration > Preferences > Control Panel Settings > Internet Settings

The only option to configure BITS and WINHTTP is to use Windows command line or PowerShell.

netsh winhttp set proxy <proxy>:<port>

or to get the configuration:

netsh winhttp show proxy

For the BITS Proxy you can use the following command:

bitsadmin /util /getieproxy <account>

You can use the following accounts:

  • LOCALSYSTEM
  • NETWORKSERVICE
  • LOCALSERVICE

To get all possible proxy settings, I created a small script to show the current proxy configuration.

#INET Proxy
$INET = Get-ItemProperty "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name ProxyEnable -ErrorAction SilentlyContinue

if($INET)
{
 if($INET.ProxyEnable -eq '1')
 {
    $INETDetected = $true
    $INETServer = (Get-ItemProperty "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name ProxyServer).ProxyServer
    
    Write-Output "INET Proxy detected and enabled" 
    Write-Output "INET Configuration:"
    Write-Output $INETServer 
    Write-Output ""

 }else{$INETDetected = $false}
}else{$INETDetected = $false}


#WINHTTP Proxy
$WINHTTP = netsh winhttp show proxy

if($WINHTTP[3] -like "*no proxy server*")
{
     $WINHTTPDetected = $false
}
else
{
    $WINHTTPDetected = $true
    
    Write-Output "WINHTTP Proxy detected and enabled" 
    Write-Output "WINHTTP Configuration:"
    Write-Output $WINHTTP[3]
    Write-Output ""
}


#BITS Proxy
$BITSLOCALSYSTEM = bitsadmin /util /getieproxy LOCALSYSTEM
$BITSNETWORKSERVICE = bitsadmin /util /getieproxy NETWORKSERVICE
$BITSLOCALSERVICE = bitsadmin /util /getieproxy LOCALSERVICE

if($BITSLOCALSERVICE[8] -like "*autodetect*" -and $BITSNETWORKSERVICE[8] -like "*autodetect*" -and $BITSLOCALSERVICE[8] -like "*autodetect*")
{
     $BITSDetected = $false
}
else
{
    $BITSDetected = $true
    Write-Output "BITS Proxy detected and enabled" 
    Write-Output "BITS Configuration:"
    Write-Output $BITSLOCALSYSTEM[5]
    Write-Output $BITSLOCALSYSTEM[8]

    Write-Output $BITSNETWORKSERVICE[5]
    Write-Output $BITSNETWORKSERVICE[8]

    Write-Output $BITSLOCALSERVICE[5]
    Write-Output $BITSLOCALSERVICE[8]
    Write-Output ""
}

if($INETDetected -eq $false -and $WINHTTPDetected -eq $false -and $BITSDetected -eq $false)
{
    Write-Output "No Proxy detected"     
}
Written by
+ posts

Empowering customers in client management since 2012.
Empowering customers in modern management since 2018.

Leave a Reply

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

*
*

This site uses Akismet to reduce spam. Learn how your comment data is processed.

BCF Shop Theme By aThemeArt.
BACK TO TOP