In certain situations, AppAssure/Rapid Recovery attachability check does attempt to detach the databases to verify before the recovery point, they belong to is dismounted. These databases may be easily recognized as they bear specific names (the "AA-" prefix, the actual database name, and a GUID).
For instance, after a failed detach operation, the database named "Zero Demand" may be found in the SQL management Studio under a name similar to "AA-Zero Demand-80dc9b5a-9287-4e28-8059-dcf5c2d0b2c4", with a RecoveryPending status.
In some cases, the number of these databases grows in the hundreds.
This issue may become a problem for Rapid Recovery if the option to perform the attachability tests on the server of origin is enabled, as the attachability tests would fail and burden the SQL server with countless error messages. Moreover, at times, backups may fail due to those databases as well.
You want to have an easy way of removing these ghost databases and even perform some automatic maintenance.
Disclaimer:
This script is provided "as is" for the purpose of illustrating how Rapid Recovery tasks may be performed in conjunction with Microsoft PowerShell. Quest shall not be liable for any direct, indirect, incidental, consequential, or other damage alleged in connection with the furnishing or use of this script or of the principles it demonstrates.