How can i find what GPO is applying a proxy

Solution 1:

You can run gpresult /h c:\temp\policy.htm on the target computer to get the resultant policy. You can also run it remotely using psexec (with cmd command) or Powershell.

Another option is to run rsop.msc on the target computer.

Note: both gpresult and rsop should be done under the affected user to collect the policies applied to his account.

In Powershell you need to use either commandlet Get-GPResultantSetOfPolicy with parameters -Computer and -User

Get-GPResultantSetOfPolicy -user someuser -computer contoso.com\computer-08 -reporttype html -path c:\reports\UserAndComputerReport.html 

Note: to run the Get-GPResultantSetOfPolicy cmdlet, you must start Windows PowerShell with elevated rights

or use the following Powershell code utilizing COM object:

$OutputFile = “C:\Temp\GPOExport.html”
$ComputerName = “test.contoso.com”
$UserName = “john”
$gpm = New-Object -ComObject GPMgmt.GPM
$constants = $gpm.GetConstants()

$gpmRSOP = $GPM.GetRSOP($Constants.RSOPModeLogging,$null,0)
$gpmRSOP.LoggingComputer = $ComputerName
$gpmRSOP.LoggingUser = $UserName

$gpmRSOP.CreateQueryResults()
$gpmRSOP.GenerateReportToFile($constants.ReportHTML,$outputfile)