Sometimes you need to set the proxy settings for the System account or NetworkService account on a server. There’s a super easy way to do this using bitsadmin.
Set accounts to use a static proxy server with exclusions:
bitsadmin /util /setieproxy localsystem MANUAL_PROXY proxysrv:8080 ";*.consoto.com" bitsadmin /util /setieproxy networkservice MANUAL_PROXY proxysrv:8080 ";*.consoto.com" bitsadmin /util /setieproxy localservice MANUAL_PROXY proxysrv:8080 ";*.consoto.com"
Set accounts to use proxy.pac file:
bitsadmin /util /setieproxy localsystem AUTOSCRIPT http://contoso.com/proxy.pac bitsadmin /util /setieproxy networkservice AUTOSCRIPT http://contoso.com/proxy.pac bitsadmin /util /setieproxy localservice AUTOSCRIPT http://contoso.com/proxy.pac
Just replace the contoso.com
and proxysrv
bits with your own organisation’s servers and pac file addresses. Then run the commands for the relevant accounts you want to change from an administrative command-line window.
More info can be found here: https://msdn.microsoft.com/en-us/library/aa362813(VS.85).aspx