• Something like this?

    foreach ($CurrentlyProcessingDB in $MyListOfDBs)

    {

    if ($ListOfDbsToIgnore -notcontains $CurrentlyProcessingDB)

    {

    Do stuff

    }

    }