Below code performs the decryption successfully but if the DB is huge it will take sometime to decrypt the DB
$sqlServer = New-Object ('Microsoft.SqlServer.Management.Smo.Server') $sqlName
$ExistingDB=$sqlServer.Databases.Item($dbname)
$ExistingDB.EncryptionEnabled=$false
$ExistingDB.Alter()
$ExistingDB.DatabaseEncryptionKey.Refresh()
$ExistingDB.DatabaseEncryptionKey.Drop()
I want to perform a backup once the decryption is completed. Is there an event handler for identifying the completion of DB decryption?