SyntaxFix
Write A Post
Hire A Developer
Questions
Look at Compare-Object
Compare-Object
Compare-Object $a1 $b1 | ForEach-Object { $_.InputObject }
Or if you would like to know where the object belongs to, then look at SideIndicator:
$a1=@(1,2,3,4,5,8) $b1=@(1,2,3,4,5,6) Compare-Object $a1 $b1