Data.Column.DupeCheck
Top  Previous  Next


Compares the text in a column of the [Data] section with existing user or mailbox data. If duplicates are found - stop, add trailing number or prompt. Also possible to prohibit "forbidden" character combinations. Example: create unique user names or email addresses.

Requirements (Only applies when command used for Exchange 5.5 properties)
·Exchange 5.5 server with Exchange SP4 or later  
·ADSI2.5  

Category

Data section

Script section
[Init]

Data.Column.DupeCheck Column, CompareWith, CompareWithPath, Action

Column
[Data] section source / destination column  

CompareWith

What to compare the column with, see table 1 below  

CompareWithPath

ADPath to object or path to text file if text file  

Action

What to do, see table 2 below  

Table 1 - CompareWith parameter
Option
Compare with
CN
Windows 2000 and 2003 Common names
MailNickname
Exchange 2000 and 2003 nicknames
samAccountName
Windows 2000 and 2003 samAccount names
Mail
Exchange 2000 and 2003 SMTP Email addresses*
TextFile
All items in a text file, one item / row (for example Linux or Novell user names exported with Data.Get.LD.Find or Data.Get.ND)
UserPrincipalName
Windows 2000 and 2003 UPN*
E55Mail
Exchange 5.5 SMTP Email addresses*
Self
Compare column with itself.

* = Notice that the part after the "@"-sign is ignored

Table 2 - Action parameter
Option
Action
AddNumber
Search the listed column and the selected AD property or file for duplicates. When a duplicate is found the number "2" is added ("carola"-> "carola2") or an existing trailing number is increased ("roger.svensson2@mymail.com"-> "roger.svensson3@mymail.com").   

AddNumberPrompt
Same as AddNumber, except that an additional dialog, where new data can be reviewed / modified, is displayed when a duplicate is found.
FindDuplicates
Search the listed column and the selected AD property or file for duplicates. If there are duplicates the script stops.
FindSubstrings
Search the listed column for all substrings listed in the text file. CompareWith must be set to TextFile. The script stops if there are matches. This option makes sure that no "forbidden" character combinations (i.e. "bad" and other words you may find inappropriate) exists in auto generated user names.
ListDuplicates
Used with CompareWith=Self

Search the listed column for duplicates, remove all non-duplicates from the [Data] section, only duplicate rows will be left.

   
Full examples
·Clean up data and generate unique Windows 2000 server user names  
·Automatically generate unique Exchange 2000 server email addresses  
·Automatically Make sure that new Exchange 5.5 server email addresses are unique  
·Generate unique Linux user names and random passwords  
·Generate unique Novell user names and random passwords