Announcement

Collapse
No announcement yet.

Hide Multiple (Not All) Contacts from GAL

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hide Multiple (Not All) Contacts from GAL

    We have about 6000 contacts to be hidden from the GAL. Exchange 2003 SP2, 2003 Domain.
    I tried ADModify but can't seem to find any option to hide unless I am missing something.
    I have the script below from the Scripting Guy which changes the MSExchHideFromAddressLists attribute to TRUE so just wondering if anyone has tried it before or can see any issues with it?

    Code:
    On Error Resume Next
    
    Const ADS_SCOPE_SUBTREE = 2
    
    Set objConnection = CreateObject("ADODB.Connection")
    Set objCommand =   CreateObject("ADODB.Command")
    objConnection.Provider = "ADsDSOObject"
    objConnection.Open "Active Directory Provider"
    Set objCommand.ActiveConnection = objConnection
    
    objCommand.Properties("Page Size") = 1000
    objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE 
    
    objCommand.CommandText = _    
     "SELECT ADsPath FROM 'LDAP://dc=fabrikam,dc=com' WHERE objectClass='contact'"  
    Set objRecordSet = objCommand.Execute
    
    objRecordSet.MoveFirst
    Do Until objRecordSet.EOF    
      strContactPath = objRecordSet.Fields("ADsPath").Value    
      Set objContact = GetObject(strContactPath)    
      objContact.MSExchHideFromAddressLists = TRUE    
      objContact.SetInfo    
      objRecordSet.MoveNext
    Loop
    TIA
    Last edited by L4ndy; 21st February 2012, 10:41.
    Caesar's cipher - 3

    ZKHQ BRX HYHQWXDOOB GHFLSKHU WKLV BRX ZLOO UHDOLVH LW ZDV D ZDVWH RI WLPH!

    SFX JNRS FC U6 MNGR

  • #2
    Re: Hide Multiple (Not All) Contacts from GAL

    Just a quick update on this. I have tested it on a small scale and it works just fine so far.
    Caesar's cipher - 3

    ZKHQ BRX HYHQWXDOOB GHFLSKHU WKLV BRX ZLOO UHDOLVH LW ZDV D ZDVWH RI WLPH!

    SFX JNRS FC U6 MNGR

    Comment


    • #3
      Re: Hide Multiple (Not All) Contacts from GAL

      Quick and easy using ADModify.

      Open and select the relevant users that need the change.
      Click on Exchange General.
      About 2/3 of the way down the screen there is a blank check box with Hide From Address Lists greyed out. Check this box and it appears.

      Good luck.
      Attached Files
      Last edited by wullieb1; 27th February 2012, 04:39.

      Comment


      • #4
        Re: Hide Multiple (Not All) Contacts from GAL

        Thanks Wullieb1.
        Don't know how I missed that??
        Script did the trick in the end but my preferred choice would've been Admodify.

        Thanks again
        Caesar's cipher - 3

        ZKHQ BRX HYHQWXDOOB GHFLSKHU WKLV BRX ZLOO UHDOLVH LW ZDV D ZDVWH RI WLPH!

        SFX JNRS FC U6 MNGR

        Comment


        • #5
          Re: Hide Multiple (Not All) Contacts from GAL

          Not a problem.

          I've used it so knew it was definately there

          Comment

          Working...
          X