+$databases = Get-Databases | Where-Object {!($_ -in $defaultExclusions -or $_ -in $configDbExclusions)}
+
+$databasesToBackup = @()
+
+if($configDbBackup -and $configDbBackup.count -gt 0) {
+ $databasesToBackup = $configDbBackup
+}
+else {
+ $databasesToBackup = $databases
+}