How can all mailboxes not enabled for store management and not deleted in Active Directory be listed?
Mailboxes can be separately enabled or disabled for store management in Archive Manager.
The Archive Manager Active Directory Connector can also disable mailboxes for store management when they have been deleted from Exchange.
In order to list all mailboxes which have not been enabled whilst filtering for legitimately disabled mailboxes (mailboxes which have been deleted from AD), a SQL script is necessary.
IMPORTANT NOTE:
The information in the script(s) provided is known to work successfully; however, they have not been officially tested by Quest Software Quality Control.
If any of these instructions are changed and/or incorrectly used, intentionally or unintentionally, this solution becomes unsupported by Quest Software Support and Development.
Quest Software Support and Development recommend to always take a backup of the current database prior to execution of any script(s) that may modify it.
For customization of the Archive Manager product, please contact our Professional Services Organization: http://www.quest.com/professional-services/
Run the following SQL script in Query Analyser to display a list of all mailboxes not enabled for Store Management and not deleted from Active Directory.
USE ArchiveManager
SELECT * FROM mailbox
INNER JOIN login ON (mailbox.ownerloginid = login.loginid)
WHERE deleted = 0 and enablestoremanager = 0 AND mailboxtype = 'user' AND loginstatus = 'Active'