Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Fastest way to compare two arrays

$
0
0

I have two arrays

 

The objects are server,sharename,path   

 

I created two variables one for each system,  The shares are 15K plus.

 

So, I was trying to find the differences and then spit the differences from one site and if there are differences, then just add action..

Is this the best way to do this.

diff $nj $pa -property sharename 

 

But then I only want to take action on the differences in PA

 

so I was thinking to pipe that to 

% {

add-sharecmdlet 

}

 

Is that even possible?


Viewing all articles
Browse latest Browse all 6937

Trending Articles