PowerShell script to automate the search of DLL files
You can replace all this:

function likeAnyOf($obj,$array)
{
    foreach($item in $array) 
    { 
        if($obj -like $item) 
        {
            return $item
        } 
    }
    return $null
}

# ...

$excluded = likeAnyOf $moduleParent (Resolve-Path $Exclude)


With this:

$excluded = Resolve-Path $Exclude | ? { $moduleParent -like $_ }


The question mark (?) is an alias for Where-Object, so read up on that for an explanation.

Instead of this:

if ($excluded -ne $null)
{
    # ...
}


you can do this:

if ($excluded)
{
    # ...
}


It's just a little bit easier to read.