I have two arrays, $a and $b, within array $a is a string which could partially match one of the entries in $b, assuming I could use a wildcard:
$a = "1", "Computer Name", "2"
$b = "3", "4", "Full Computer Name Here"
foreach ($line in $a) {
foreach ($line2 in $b) {
where "*$line*" -like "*$line2*"
}
}
I've got here after trying all the simple 'this array matches that array', into foreach for one array, then tried all the Select-String to Compare-Object $line $line2 -ExcludeDifferent -IncludeEqual -PassThru, but can't get anything to work.
Ideally, it'd return 'Full Computer Name Here' where it matches.