I have an array called $oldprintarray and an array called $newprintarray.

In each array is a printer mapping like so.

$oldprintarray:

$oldprinter1=\\server\path1
$oldprinter2=\\server\path2
$oldprinter3=\\server\path3

$newprintarray:

$newprinter1=\\server\path1
$newprinter2=\\server\path2
$newprinter3=\\server\path3

OldPrinter1 represents the printer to be replaced and NewPrinter1 represents the replacement.

I have to do it this way because the servers and the queue names are not the same.

The arrays are pulled from 2 seperate text files that the NT Server team will be populating.

In my script if $OldPrinter1 is detected on the system then I want it to be replaced with $NewPrinter1. $OldPrinter1 will always go with $NewPrinter1 and $OldPrinter2 will always go with $NewPrinter2 etc.

Is there a way to search $newprintarray for the corresponding printer without using a "For Each"

Ex.-

I already know new $oldprinter1 is on my machine and needs to be replaced. Now I want to replace it with it's cooresponding value ($newprinter1).

How can I match this??

Sorry if this is a little confusing.

Thanks,
S