Perform an Unattended Removal of an AD LDS Instance

Applies To: Windows Server 2008

You can use this procedure to remove an Active Directory Lightweight Directory Services (AD LDS) instance without using Programs and Features by performing an unattended removal of AD LDS. An unattended removal of AD LDS can only be performed under the security context of the AD LDS administrator. If you are not currently logged on as the AD LDS administrator, the AD LDS administrator credentials can be specified through a text answer file.

Membership in the local Administrators group, or equivalent, is the minimum required to complete this procedure. Review details about using the appropriate accounts and group memberships at Local and Domain Default Groups (https://go.microsoft.com/fwlink/?LinkId=83477).

To perform an unattended removal of an AD LDS instance

  1. To open a command prompt, click Start, click Run, and then type cmd.

  2. At a command prompt, switch to the %windir%\ADAM directory, type the following command and then press ENTER:

    ADAMuninstall /i:instancename /answer:d:\dirpath\filename

    where instancename represents the name of the AD LDS instance to be removed, and d:\dirpath\filename represents the drive, path and file name of an optional answer file that contains the credentials of the AD LDS administrator for the specified instance.

Notes

  • To pass the credentials of the AD LDS administrator to ADAMSuninstall from the command line, create a text answer file that contains the following syntax and then press ENTER:

    Administrator=domain\account

    AdministratorPassword=password

    where domain\account represents the domain and account name of the AD LDS administrator, and password represents the corresponding password.

  • The following code represents a sample answer file to use with ADAMuninstall:

    Administrator=cohovineyard\administrator
    AdministratorPassword=adminpassword