New-GlobalAddresslist “ORG-A.” –ConditionalCustomAttribute1 “ORGA” –IncludedRecipients “AllRecipients”
But, and unexpectedly, I got the following error
WARNING: One or more global address lists were missing from the Active Directory attribute. This is likely caused by using legacy Exchange management tools to create global address lists.
Active Directory operation failed on ex01.testlab.com. This error is not retriable. Additional information: The name reference is invalid.
This may be caused by replication latency between Active Directory domain controllers.
Active directory response: 000020B5: AtrErr: DSID-0315286E, #1:
0: 000020B5: DSID-0315286E, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 907ff (globalAddressList2)
+ CategoryInfo : NotSpecified: (0:Int32) [New-GlobalAddressList], ADConstraintViolationException
+ FullyQualifiedErrorId : AD44A06F,Microsoft.Exchange.Management.SystemConfigurationTasks.NewGlobalAddressList
$ad = [ADSI]"LDAP://rootDSE";
$domain = $ad.rootDomainNamingContext;
$obj = New-Object System.DirectoryServices.DirectoryEntry("LDAP://CN=Microsoft Exchange,CN=Services,CN=Configuration,$domain");
$count = 0;
$Gals1= $obj.GlobalAddressList;
foreach($g in $Gals1)
{
$g= $g.ToString().ToLower();
if($g.Contains("cn=deleted objects"))
{
Write-Host $g;
$count= $count +1;
}
}
Write-Host "$Count corrupted GAL entries found in property GlobalAddressList";
$count = 0;
$Gals2= $obj.GlobalAddressList2;
foreach($g in $Gals2)
{
$g= $g.ToString().ToLower();
if($g.Contains("cn=deleted objects"))
{
Write-Host $g;
$count= $count +1;
}
}
Write-Host "$Count corrupted GAL entries found in property GlobalAddressList2";
cn=myglobaladdresslist2\0adel:6931193c-3362-489b-a766-4d1820704080,cn=deleted objects,cn=configuration,dc=testlab,dc=com
1 corrupted GAL entries found in property GlobalAddressList
0 corrupted GAL entries found in property GlobalAddressList2
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (0)