How can I change the WinHTTP proxy settings?
If you configure Datto RMM to work with a proxy server, you may experience unpredictable behavior if you do not also configure the WinHTTP proxy settings on the managed endpoint.
Datto RMM interacts with the Windows Update Agent (WUA) API and relies on the WinHTTP proxy settings managed by Windows. These proxy settings are not enabled by default, as Windows Updates normally run within a user session where the proxy settings are inherited from Internet Explorer. Refer to How the Windows Update client determines which proxy server to use to connect to the Windows Update Web site from Microsoft for more information.
When the Datto RMM Agent calls the Windows Updates utility, it does not have access to the user-specific proxy settings from Internet Explorer. As a result, the Windows Update program will not be able to access the internet to update its list of missing or installed patches.
When this happens, you may notice that the list of missing and installed patches for the endpoint compiled by the Datto RMM Agent does not match the local Windows Updates list. In some cases, the Agent may not list any patches at all.
This article explains how to change WinHTTP proxy settings manually by using the Windows Command Prompt. It also provides a walk-through for deploying these actions through a ComStore component.
To manually set the WinHTTP proxy name and port, follow the steps that correspond with the operating system installed on your endpoint:
- Open an administrator-level Windows Command Prompt session.
- From the prompt, run the following command:
proxycfg -p {proxyservername}:{portnumber}
NOTE Substitute proxyservername
with the name of the proxy and portnumber
with the communication port that your endpoint should use.
- Open an administrator-level Windows Command Prompt session.
- From the prompt, run the following command:
netsh winhttp set proxy {proxyservername}:{portnumber}
NOTE Substitute proxyservername
with the name of the proxy and portnumber
with the communication port that your endpoint should use.
To manually remove a configured WinHTTP proxy, follow the steps that correspond with the operating system installed on your endpoint:
- Open an administrator-level Windows Command Prompt session.
- From the prompt, run the following command to remove the proxy:
proxycfg -d
- Open an administrator-level Windows Command Prompt session.
- From the prompt, run the following command to remove the proxy:
netsh winhttp reset proxy
Complete the following steps to automate the process of adding and removing proxy settings by using components from the ComStore:
- Navigate to the ComStore. Refer to ComStore.
- Search for WinHTTP proxy. You should see the following results:
- WinHTTP Proxy (Add) [WIN]: This component will add a system-level proxy setting on the target device.
- WinHTTP Proxy (Remove)[WIN]: This component will remove a system-level proxy setting on the target device.
- Add the component matching the task you'd like to perform to your Component Library.
- Deploy the component. Specify the
{proxyservername}
and{portnumber}
as input variables at run time. The components will intelligently decide whether to use thePROXYCFG
or theNETSH
command to achieve the desired results in your environment.
For more information about deploying components, refer to Scheduled jobs. To learn about component variables, refer to Input variables.