Perform an unattended removal of an ADAM instance

Applies To: Windows Server 2003 R2

You can remove an ADAM instance without using Add or Remove Programs, by performing an unattended removal of Active Directory Application Mode (ADAM). An unattended removal of ADAM can only be performed under the security context of the ADAM administrator. If you are not currently logged on as the ADAM administrator, the ADAM administrator credentials can be specified through a text answer file.

To perform an unattended removal of an ADAM instance

  • At a command prompt (or in a batch or script file), type the following command:

    **adamuninstall /i:**instancename **/answer:**d:\dirpath\filename

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

Notes

  • To open a command prompt, click Start, point to All programs, point to Accessories, and then click Command prompt.

  • To pass the credentials of the ADAM administrator to adamuninstall from the command line, create a text answer file containing the following syntax:

    **Administrator=**domain\account

    **AdministratorPassword=**password

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

  • The following represents a sample answer file for use with adamuninstall:

    Administrator=cohovineyard\administrator
    AdministratorPassword=adminpassword
    
  • For both installs and uninstalls, ADAM uses a registry key to return error codes and messages back to the caller, for example, an .msi package. ADAM Setup creates this registry key and associated values only if errors or warnings occur. This registry key is HKLM\Software\Microsoft\Windows\CurrentVersion\ADAM_Installer_Results, and it includes the possible values in the following table.

    Key Contents

    ADAMInstallErrorCode

    The numeric error code that caused the installer to fail

    ADAMInstallErrorMessage

    A message that is associated with the install error code

    ADAMInstallWarnings

    Messages that are associated with the install warnings

    ADAMUninstallErrorCode

    The numeric error code that caused the uninstall to fail

    ADAMUninstallErrorMessage

    A message that is associated with the uninstall error code

    ADAMUninstallWarnings

    Messages that are associated with the uninstall warnings

See Also

Concepts

Remove an ADAM instance
Manually remove ADAM service principal names from Active Directory
Adamuninstall