How to find out IE's Proxy settings for all users on a server (i.e. Windows 2008R2)?

I am trying to pull this information with the following below powershell script but it is only fetching the information for my profile and not all the users that have logged in to the server. Am I looking into the wrong place? Thank you for your help and guidance.

$keyname = "Software\Microsoft\Windows\CurrentVersion\Internet Settings"

$reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine',$server) 
$key = $reg.OpenSubkey($keyname) 
$ProxyStatus = $key.GetValue('ProxyEnable') 
$proxyURL = $key.GetValue('AutoConfigURL')

Solution 1:

Try this regular command, not powershell specific:

reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable
reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer

Also check this; I can't tell exactly in which cases it's used, I had to set it on Windows Server Core editions but it's available on Full editions also:
netsh winhttp show proxy