Coexisting with Previous Versions

Using Command-Line Options

If you do not want to use Active Directory Account Cleanup Wizard, you can also find, and merge duplicate accounts from the MS-DOS prompt. By default, the executable for the wizard (ADClean.exe) is installed into the <SystemRoot>\Program Files\Exchsrvr\Bin directory.

Note   Although Active Directory Account Cleanup Wizard can be run from the MS-DOS prompt, it is primarily designed to be run from the Start menu.

Use the following table to help you search for and merge duplicate accounts in Active Directory using MS-DOS commands:

Option Description Example
/? Displays the available MS-DOS command line options. Adclean /?
/S Searches for duplicate accounts and saves them as a list of merge operations in a MergeFileName.csv file in your working directory. Adclean /S

Searches your entire forest for duplicate accounts based on objects that have been created by Active Directory Connector (ADC). The amount of time this takes depends on the size and number of duplicate accounts in Active Directory. To extend the search for duplicate objects, see the /X Command. To specify the containers that are searched, see the /C command.

/X Used with the /S command if you want to extend the search for duplicate accounts to include objects that have been created by ADC, mail connectors (for example, MS Mail Connector), and other tools. Adclean /S /X
/C Used with the /S command to specify the containers that you want to search for duplicate accounts.

The result of this search is a Merge.csv file that contains a list of merge operations found when searching the containers designated in the Container.csv file you have created. This Merge.csv file is saved in your working directory.

Adclean /S /C:D:\Program Files/Exchsrvr/BIN/<ContainerFileName.csv>

where D:\Program Files/Exchsrvr/BIN/<ContainerFileName.csv> is the location of the .csv file that contains the locations of the directory containers you want to search.

Before you can use the /C option, you must manually create a .csv file in a .csv application (for example, Notepad). This Notepad file must have the word Container on the first line, and then list the paths of the containers you want to search on subsequent lines.

In the previous example, the text in the <ContainerFileName.csv> Notepad file might look like the following:

Container

server1.east.contoso.com/Users

/M Performs the merge operations listed in the MergeFileName.csv file in the working directory. Adclean /M

A merge with only the /M command will merge only duplicate accounts from the MergeFileName.csv file in the directory in which Adclean.exe is installed.

/O Used with the /M command to merge duplicate accounts based on a MergeFileName.csv file that you specify. Adclean /M O/:D:/Program Files/Exchsrvr/BIN/<MergeFileName.csv>

where D:/Program Files/Exchsrv/BIN/<MergeFileName.csv> is the location of a file that contains the list of merge operations you want to perform.

/L Changes the location of the Active Directory Account Cleanup log file. /L:C:\temp\adclean.log

where C:\temp\adclean.log is the location and file name you want to use for the log file. By default, the log file is created in the Exchsrvr/BIN directory.

Important   You cannot use the /S (Search) and /M (Merge) command at the same time

Related Topics

Install Active Directory Account Cleanup Wizard Understanding Active Directory Cleanup Understanding Merge Operations