Example #1
0
 /**
  * Returns a list of Exchange Servers in the ConfigurationNamingContext of the domain
  * 
  * @param array $attributes An array of the AD attributes you wish to return
  * @return array
  */
 public function servers($attributes = array('cn', 'distinguishedname', 'serialnumber'))
 {
     if (!$this->adldap->getLdapBind()) {
         return false;
     }
     $configurationNamingContext = $this->adldap->getRootDse(array('configurationnamingcontext'));
     $sr = @ldap_search($this->adldap->getLdapConnection(), $configurationNamingContext[0]['configurationnamingcontext'][0], '(&(objectCategory=msExchExchangeServer))', $attributes);
     $entries = @ldap_get_entries($this->adldap->getLdapConnection(), $sr);
     return $entries;
 }