Created
November 6, 2015 22:31
-
-
Save jeffgreenca/532b38cb3107302d85b8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function find-common-values($oArr) { | |
$i = 0 | |
$commonValues = $oArr[0] | |
$oArr | % { | |
$i++ | |
if($commonValues -eq $null) { return "Well shucks, after $i iterations" } | |
$commonValues = Compare-Object $commonValues $_ -IncludeEqual -PassThru -ExcludeDifferent | |
} | |
return $commonValues | |
} | |
Compare-Object (find-common-values $evcProblemVms) (vd $evcOKVms[0]) | ? {$_SideIndicator -eq "<="} | |
$values = @() | |
$evcProblemPenryn | % { $values += (vd $_) } | |
$values = "" | |
$values = $evcProblemPenryn | % { vd $_ } | |
$uniqueValues = $values | sort | get-unique | |
$commonValues = @() | |
foreach($v in $uniqueValues) { | |
if( ($values | ? {$_ -eq $v}).Count -eq 6 ) { $commonValues += $v } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment