Jump to content

Recommended Posts

Posted (edited)

Hi all,

 

Wondering if anyone knows how to search all the GPO's in a domain for a specific value.

 

I noticed a machine where I did a manual Windows install from a disc. When I popped it in its OU it picked up an old proxy server address that is lingering in there somewhere.

 

I think the setting is from the old Internet Explorer settings that used to be in Server 2008 GPMC but not 2012 GPMC, hence I can't find it manually or with Powershell.

 

 

Any ideas on how to clean it up ??

 

 

 

 

Cheers in advance :)

Edited by mikkydoos
Posted (edited)
You would use GPO modelling or results in the Group Policy Management Console.

 

Thanks @ChrisH

 

I have done that but to no avail.

 

The old settings where this would have originally been before the new 2012 R2 domain controllers was Internet Explorer Maintenance, which no longer exists, and subsequently doesn't appear on any reports, but its seems its still lurking in there somewhere and propagating out to clients. It may even be left over from Server 2003.

Edited by mikkydoos
Posted

I have had issues like this in the past and at the time I made a shortcut to this script available to blank out the proxy settings, if the users ran into issues.

' Initialize Objects
    Dim LocalClass_StdRegProv: Set LocalClass_StdRegProv = GetObject("winmgmts:{impersonationlevel=impersonate}!//./root/default:StdRegProv")
    Dim EmptyRecordset: Set EmptyRecordset = CreateObject("ADODB.Recordset")
' Define Constants
    Const HKEY_CLASSES_ROOT = &H80000000, HKCR = &H80000000
    Const HKEY_CURRENT_USER = &H80000001, HKCU = &H80000001
    Const HKEY_LOCAL_MACHINE = &H80000002, HKLM = &H80000002
    Const HKEY_USERS = &H80000003, HKU = &H80000003
    Const HKEY_PERFORMANCE_DATA = &H80000004, HKPD = &H80000004
    Const HKEY_CURRENT_CONFIG = &H80000005, HKCC = &H80000005
    Const HKEY_DYN_DATA = &H80000006, HKDD = &H80000006
    Const MaxCharacters = 255
    Const adVarChar = 200
    Const adInteger = 3

' Define Proxy Settings
Const ProxyAddress = ""	
'Const Port = 

Dim CurrentSetting: CurrentSetting = LocalClass_StdRegProv.GetStringValue(HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer",strValue)
   
	WScript.Echo "The current settings are:" & strValue

    
        Dim ProxyServer: ProxyServer = ProxyAddress & ":" & Port
       
    
            Return = LocalClass_StdRegProv.SetDWORDValue(HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable", 0)
           Return = LocalClass_StdRegProv.SetStringValue(HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer", ProxyServer)
            If Err.Number = 0 And Return = 0 Then
                WScript.Echo "Internet settings changed. Exiting."
            Else
                WScript.Echo "Internet settings not changed. Exiting."
            End If
        
    

 

Not a solution but a workaround for now.

  • Thanks 1
Posted
You could also just use GPP to write these reg entries every time someone logs on.

 

Yep. I haven't got a problem generally, just the one I manually installed I noticed picked up the setting.

Another GPO is has precedence over the problem setting anyway when the machine is moved to the appropriate OU.

 

Don't like settings lurking!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...